Hi all,
On my custom web page, I've included the Omnichannel chat widget. Through JavaScript, I want to obtain an ongoing conversation ID for any event (lcw:startChat, lcw:chatRetrieved or Icw:onClose).
Hi all,
On my custom web page, I've included the Omnichannel chat widget. Through JavaScript, I want to obtain an ongoing conversation ID for any event (lcw:startChat, lcw:chatRetrieved or Icw:onClose).
Resurfacing this thread to suggest 2 workarounds:
For chatbots created in the new authoring canvas, you can get the conversation id directly from the system variables:
Note: as of today the new unified authoring canvas isn't available for Omnichannel for Customer Service integration.
Open the PVA bot with Bot Framework Composer:
Create a new dialog (e.g. GetConversationId)
In the dialog, under "Dialog Interface", add a new Output.
With a key name, e.g. "conversationId" and of type "string".
In BeginDialog, add a new node of type "Set a property" (under "Manage properties"), and define it with:
Property: dialog.result.conversationId
Value: =turn.activity.conversation.id (even if it's not auto-suggested)
In Bot Framework Composer, the final step is to publish the bot:
Back in Power Virtual Agents, in a topic, you can select "Redirect to another topic" and select the "getConversationId" dialog.
The conversationId variable will be available as an output:
Hi VS Singh,
Unfortunately, you can't get conversation ID on your web page.
The official offers the API to get it. However, it can get on the Omnichannel Side.
Reference:
getConversationId (Omnichannel JavaScript API reference) | Microsoft Docs
Get Omnichannel Conversation Id and Custom Context through JavaScript - Carl de Souza
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,269 Super User 2024 Season 2
Martin Dráb 230,198 Most Valuable Professional
nmaenpaa 101,156