Setting variables based on response text chosen

I am creating a chatbot but the use case is a little bizarre. More specifically, the chatbot will be playing the role of someone asking questions, and I will be acting as the customer service representative. So for example, I will type “How can I help you?”, and the chatbot will respond with something like "What are the meal options on flight ABC?"I already have a massive list of potential questions the chatbot could ask.

So as you might expect, there will be many text options for when I type “How can I help you”…from can I get a flight from A to B on day X to what airports are available in state Y? From what I understand, if there are many text options under something like utter_help_me under responses in domain, a text will be chosen randomly. But I want variables to be set based on what text is randomly chosen. Is there a way to do that? I know this is usually done based on what is typed and not what is returned in a response, so this is the strange part

1 Like

Instead of “utter_help_me” intent, you could trigger a custom action “action_help_me” for your intent help_me.

In the custom action, select a text option at random and based on the selection, set your variables accordingly