Getting Conversation Id and Session Id Context in Omnichannel Chat

Leave a comment

In this post, we will look at how to get the Omnichannel Conversation Id and Session Id context variables in an incoming chat. This is useful if you want to tie the conversation to a custom entity or use it in an integration. Let’s go through an example of how to do this.

We will create a new session template in the Omnichannel Administrator app, which will load in an incoming chat:

Next, let’s add a new Application Tab Template to demonstrate getting and using the Conversation Id. We will display an Entity Record, and actually display the Conversation record by passing it the current Conversation Id. The conversation table is msdyn_ocliveworkitem, and the format for the entityId we want is {LiveWorkItemId}:

Let’s also create one for the Session Id. In a similar way, the Session table is msdyn_ocsession, and the entityId is {OCSessionId}:

Our template should now look like this:

And when a call comes in, we can see our Conversation loads using the Id we have dynamically passed:

That’s it. You can now apply these variables to the scenarios that meet your needs.

THANKS FOR READING. BEFORE YOU LEAVE, I NEED YOUR HELP.
 

I AM SPENDING MORE TIME THESE DAYS CREATING YOUTUBE VIDEOS TO HELP PEOPLE LEARN THE MICROSOFT POWER PLATFORM.

IF YOU WOULD LIKE TO SEE HOW I BUILD APPS, OR FIND SOMETHING USEFUL READING MY BLOG, I WOULD REALLY APPRECIATE YOU SUBSCRIBING TO MY YOUTUBE CHANNEL.

THANK YOU, AND LET'S KEEP LEARNING TOGETHER.

CARL

https://www.youtube.com/carldesouza

 

ABOUT CARL DE SOUZA

Carl de Souza is a developer and architect focusing on Microsoft Dynamics 365, Power BI, Azure, and AI.

carldesouza.comLinkedIn Twitter | YouTube

 

Leave a Reply

Your email address will not be published. Required fields are marked *