cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Daveed1973
Helper II
Helper II

Capture initial user input into a global variable

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

1 ACCEPTED SOLUTION

Accepted Solutions
renatoromao
Super User
Super User

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 😞 


Did I answer your question? Mark my post as a solution!
Thanks!

Renato Romão,

Connect with me here 😉

Power Virtual Agents course (+2.650 students) : English | Português

View solution in original post

3 REPLIES 3
renatoromao
Super User
Super User

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.


Did I answer your question? Mark my post as a solution!
Thanks!

Renato Romão,

Connect with me here 😉

Power Virtual Agents course (+2.650 students) : English | Português

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?

renatoromao
Super User
Super User

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 😞 


Did I answer your question? Mark my post as a solution!
Thanks!

Renato Romão,

Connect with me here 😉

Power Virtual Agents course (+2.650 students) : English | Português

View solution in original post

Helpful resources

Announcements
Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Center-of-Excellence-Starter-Kit-cropped 768x460.png

The Total Economic Impact™ of Power Virtual Agents

Read this 2021 commissioned study, conducted by Forrester Consulting.

Users online (3,594)