Skip to main content

Notifications

Power Platform Community / Forums / General / Capture initial user i...
General
Answered

Capture initial user input into a global variable

Posted on by 16

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:
  • Verified answer
    renatoromao Profile Picture
    renatoromao 6,459 on at
    Re: Capture initial user input into a global variable

    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 😞 

  • Daveed1973 Profile Picture
    Daveed1973 16 on at
    Re: Capture initial user input into a global variable

    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 Profile Picture
    renatoromao 6,459 on at
    Re: Capture initial user input into a global variable

    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.

Helpful resources

Quick Links

Exciting News for Copilot Studio Communi…

Get ready to experience a whole new level of engagement with the Copilot Studio…

Celebrating the May Super User of the…

LaurensM is an exceptional contributor to the Power Platform Community…

Check out the Copilot Studio Cookbook…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
renatoromao Profile Picture

renatoromao 6,459

#2
Pstork1 Profile Picture

Pstork1 1,954

#3
Expiscornovus Profile Picture

Expiscornovus 1,667