Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Copilot Studio - General
Answered

How to get conversation ID in Power virtual atent

(2) ShareShare
ReportReport
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
    28 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
    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
    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
    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
    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
    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
    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
    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
    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
    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Copilot Studio - General

#1
stampcoin Profile Picture

stampcoin 6

#2
Artur Stepniak Profile Picture

Artur Stepniak 5 Super User 2025 Season 1

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 4 Super User 2025 Season 1

Overall leaderboard