web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Suggested Answer

Passing context variables from contact center to copilot studio bot

(0) ShareShare
ReportReport
Posted on by 15
Created separate topic "Set context variables" (not invoked, as per documentation)
Copilot Studio Configuration:
Created separate topic "Set context variables" (not invoked, as per documentation)
Variable Global.Name, Global.Email, Global.Phone configured with:
Global scope (any topic can access)
External sources can set values ✅
Reference: "Get value from this node if empty"
 
The context variables work perfectly and appear in the agent summary when a human agent accepts the chat. The issue is specifically with the bot not receiving this context data at chat initialization.
 
I am using no authentication for both copilot studio agent and the omnichannel and it is still not working.

I even tried displaying the values before and after setting the context variables (you can see the before case below working properly), however after setting the context variable they are all null.
 
Kindly find below some screenshots for your reference.
 
Did anyone find any resolution or workaround for this issue?


The above are demo data.


Followed Microsoft's official documentation and as mentioned in this thread.


This message node is the one displayed directly after setting the context variables in the first screenshot
 
Any assistance on this as soon as possible is much appreciated
I have the same question (0)
  • Suggested answer
    Eugen Podkorytov Profile Picture
    233 on at
    Hi TI-09120726-0,
    Why do you set the variable to null?

     
    Do NOT set the variables to empty unless you want to clear them!
  • TI-09120726-0 Profile Picture
    15 on at
     
     
     
    I clicked on the 3 dots after selecting the global variable and selected “get value from this node if empty”

     
     
    Another note is that you can’t use a “set a variable” node without actually setting a value for the variable.
  • JonathonN Profile Picture
    Microsoft Employee on at

    In the official documentation, the ‘variable definer’ topic is never meant to be invoked. It is primarily there to define the your custom variable names for the Copilot Studio authoring experience.  E.g. the topic is there so you can directly reference the variables later as you're writing your topic flows. You'd never want to actually invoke the ‘variable definer’ topic directly: it would override the variable values to blank/empty text.

    From what I can see in your screenshot, you're invoking a topic that reads out the variables correctly (name, email, and phone came back fine), but then you're setting the values to empty right after it. 

    Try moving the variable defining nodes into a separate, un-called, topic. 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 67 Most Valuable Professional

#2
11manish Profile Picture

11manish 25 Super User 2026 Season 2

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 19 Most Valuable Professional

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans