Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Copilot Studio - General
Answered

Virtual Agent Bot has empty variable msdyn_ConversationId

(1) ShareShare
ReportReport
Posted on by

Hello,

I'm having a problem with Power Virtual Agent. When I start a new voice chat the bot doesn't insert a conversationId in the variable bot.msdyn_conversationId. I controlled everything and have no idea what's wrong.

I discoverd this issue checking why a couple of Power automate flows continued to fail an notiched the empty conversationId.

I'm sure the bot should be working fine cuase it was exported from an enviroment where it worked whitout problem whit all the needed components.

Has anyone an Idea about what could have I missed?

Categories:
  • Verified answer
    HenryJammes Profile Picture
    on at
    Re: Virtual Agent Bot has empty variable msdyn_ConversationId

    Hi @DavideSalma,

     

    This seems specific to the Dynamics 365 Omnichannel for Customer Service integration.

    Can you ask the question on their community forum? Dynamics 365 Customer Service Forum - Support & Help.

     

    I'm also sharing how to get the Conversation ID through other means:

    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.id (even if it's not auto-suggested)

    HenryJammes_4-1669409640245.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

     

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 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…

Leaderboard > Copilot Studio - General

#1
Pablo Roldan Profile Picture

Pablo Roldan 33

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 25

#3
stampcoin Profile Picture

stampcoin 10

Overall leaderboard