Skip to main content

Notifications

Copilot Studio - General
Answered

How to get conversation ID in Power virtual atent

Posted on by 16

I am creating a bot in which I need to know conversation ID of the conversation which can be used to get the transcript of the conversation . How do I get conversation ID.

  • zhengtzerlee Profile Picture
    zhengtzerlee 21 on at
    How to get conversation ID in Power virtual atent
    4 years, now 2024, i still have the problem as you..lol Microsoft
  • HenryJammes Profile Picture
    HenryJammes on at
    Re: How to get conversation ID in Power virtual atent

    Not sure what you mean, the conversation ID is available in a system variable if needed

  • xhan1 Profile Picture
    xhan1 14 on at
    Re: How to get conversation ID in Power virtual atent

    Thanks @HenryJammes by the way, do you have any ideas to check a specific conversation? The conversation transcript id seems to be unique, but we cannot capture it in PVA

  • HenryJammes Profile Picture
    HenryJammes on at
    Re: How to get conversation ID in Power virtual atent

    Yes, this is expected for conversations happening over the Teams channel.

    They can exist across multiple records in Dataverse.

  • xhan1 Profile Picture
    xhan1 14 on at
    Re: How to get conversation ID in Power virtual atent

    Hi @HenryJammes , for option1, The conversation ID does not seem to be a property that identifies different conversations. We'd like to build a report that analyzes conversation history by conversation. However, we found that the name in the Dataverse (conversation ID in PVA) is not unique. The scenario is that if the bot is not helpful, we will record a conversation ID and then link to the Conversation details through that ID .

     

    Screenshot in Dataverse (ConversationTranscrips): the same conversation ID (Name) maps multiple sessions

    xhan1_1-1702518575572.png

     

  • HenryJammes Profile Picture
    HenryJammes on at
    Re: How to get conversation ID in Power virtual atent

    Hi @postimerkk1 

    Yes, that's correct.
    By the way, as a user, you can also obtain the Conversation ID by typing "/debug conversationid" in the chat.

    HenryJammes_0-1670928427422.png

     

     

  • postimerkk1 Profile Picture
    postimerkk1 12 on at
    Re: How to get conversation ID in Power virtual atent

    Thanks for resurfacing this! Just to confirm, for option 2, the id will then still need to be parsed from the output i.e. |00000000 is not part of the id, correct?

  • HenryJammes Profile Picture
    HenryJammes on at
    Re: How to get conversation ID in Power virtual atent

    Resurfacing this thread to suggest 2 workarounds:

    1) In the new PVA unified authoring canvas (currently in public preview)

    For chatbots created in the new authoring canvas, you can get the conversation id directly from the system variables:

    HenryJammes_0-1669409107541.png

    2) In the production version of PVA, using Bot Framework Composer

    Open the PVA bot with Bot Framework Composer:

    HenryJammes_1-1669409192917.png

    Create a new dialog (e.g. GetConversationId)

    HenryJammes_2-1669409349518.png

    In the dialog, under "Dialog Interface", add a new Output.
    With a key name, e.g. "conversationId" and of type "string".

    HenryJammes_3-1669409448820.png

    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)

    HenryJammes_0-1677772426553.png

     

     

    In Bot Framework Composer, the final step is to publish the bot:

     

    HenryJammes_5-1669409707196.png

    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:

    HenryJammes_6-1669409928357.png

     

  • mselvadevi Profile Picture
    mselvadevi 16 on at
    Re: How to get conversation ID in Power virtual atent

    No,  I am yet to find solution for it. for me it need transcript of the conversation and also need to add additional information in the dynamic entity which stores the information.

  • dougmaloney Profile Picture
    dougmaloney 59 on at
    Re: How to get conversation ID in Power virtual atent

    @mselvadevi did you manage to figure out how to do this ? In the absence of global variables I need a unique ID for the conversation.

Helpful resources

Quick Links

Welcome to the Power Platform…

We are thrilled to unveil the newly-launched Power Platform Communities!…

Getting Started…

Welcome to the Power Platform Community! We appreciate your visit…

Welcome to the new Power Platform Community!…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 138,287

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,172

Leaderboard