Skip to main content

Notifications

Announcements

No record found.

Power Platform Community / Forums / General / How to get conversatio...
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.

Categories:
  • 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 12 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 12 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 58 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.

  • Verified answer
    renatoromao Profile Picture
    renatoromao 6,459 on at
    Re: How to get conversation ID in Power virtual atent

    Hi @mselvadevi ,

     

    Unfortunately, you cannot do it yet.

    Please, vote in my idea and make this answer as the solution, to help more users.

    https://powerusers.microsoft.com/t5/Power-Apps-Ideas/Receive-whole-Conversation-by-email/idi-p/514397

     

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

    Thanks!
    Renato Romão
    https://www.linkedin.com/in/renatoromao/

Helpful resources

Quick Links

Exciting News for Copilot Studio Communi…

Get ready to experience a whole new level of engagement with the Copilot Studio…

Celebrating the May Super User of the…

LaurensM is an exceptional contributor to the Power Platform Community…

Check out the Copilot Studio Cookbook…

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

Leaderboard

#1
renatoromao Profile Picture

renatoromao 6,459

#2
Pstork1 Profile Picture

Pstork1 1,954

#3
Expiscornovus Profile Picture

Expiscornovus 1,648