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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Capture initial user i...
Copilot Studio
Unanswered

Capture initial user input into a global variable

(0) ShareShare
ReportReport
Posted on by 67

I've created a IT help desk bot which aims to solve easy to answer problems for the end user. What I would like to do is capture a users first input into a variable for a couple of reasons.

  • So that I can then raise an IT ticket if the bot can't solve the problem using the users input as the summary of the issue
  • Report on the users questions so that I can improve the topics trigger phrases based on what they entered. 

So is there a way of capturing what the user enters after the Greeting topic into a global variable?

 

For example, in the Greeting topic the last node is a message that says "What can I help you with today?". Then the bot waits for user input. The user could type something simple like "my iphone won't start". I have two custom entities. One to capture the thing that is causing the issue, in this case the "iphone", then another entity to capture the problem itself, in this case "won't start". 

 

Then the relevant topic is started based on the user input

 

Thanks in advance

Categories:
I have the same question (0)
  • CU22081450-0 Profile Picture
    Most Valuable Professional on at

    Hi @Daveed1973 ,

     

    Yes, you can do it.

    You can see this documentation: Use chatbot variables to carry content across topics - Power Virtual Agents | Microsoft Docs

     

    Basically, you will set as a global variable, also, you can reuse in all topics.

  • Daveed1973 Profile Picture
    67 on at

    Unfortunately this doesn't answer my question.

     

    I have no problem using bot variables but the issue I have here is that I am not asking a question to gain the users input to put into a variable. The greeting topic ends with a message box that says "What can I help you with today?" then waits for the users input which determines which topic is chosen.

     

    I toyed with the idea of changing the message box to a question instead so I can assign the response to a variable but I would need to capture the user's entire response which means that entity extraction will not work and I use entity extraction in all the topics I have.

     

    I have enabled the failback topic, and this kind of gives me what I need in a system variable called UnrecognizedTriggerPhrase but I need to capture inputs that do not come from the failback topic too.

     

    Hope that makes sense?

  • Verified answer
    CU22081450-0 Profile Picture
    Most Valuable Professional on at

    Hi @Daveed1973 ,

     

    Cool, I got it now!

    Yes, if you use a message you cannot get this initial message as a global variable. Also, if you use a question, your Greeting topic will not redirect automatically to the right topic.

     

    My suggestion is: you can use System Fallback (as you said), also, you can add all question that you have (entity questions) as a global variable.

    So, when a user sends a message and your bot don't understand, will redirect to the Fallback. And in this topic (system fallback) you can send to Power Automate (calling an action) the UnrecognizedTriggerPhrase and all questions that your bot capture during this conversation, and store to Excel , SharePoint, Dataverse, etc...

     

    Anything different from this scenario, we have a limitation 😞 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 265 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 240 Super User 2025 Season 2

#3
S-Venkadesh Profile Picture

S-Venkadesh 101 Moderator

Last 30 days Overall leaderboard