Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Capture user input from Static Choice and redirect

AleOliveira
Tera Contributor

I am currently working on a Virtual Agent topic in ServiceNow, and I need some help with capturing user input from a "Static Choice" node by enabling the "Conversation Switching" option and then redirecting the user based on their input.

Here is what I am trying to achieve:

  1. I present the user with a Static Choice node with options like "IT", "Doubts", "Open Calls".
  2. I have enabled the "Conversation Switching" option to allow users to enter free text.
  3. I want to capture this free text input and store it in a variable.
  4. Based on the user’s input, I want to redirect the conversation to different topics using a Decision node.

 

My question is: Is there a way to capture the user input directly from a Static Choice node by enabling "Conversation Switching" and redirect to another topic based on this input without having to prompt the user again? Any examples or guidance would be greatly appreciated.

Thank you for your help!

4 REPLIES 4

Praveen Kumar30
Tera Contributor

Hi @AleOliveira,

 

We are also stuck with same requirement. Can you please let us know If you have any solution it would be better to solve the issue. 

 

Regards,

Praveen

AnaBeatrizA
Tera Guru
Hey I was not able to use the "Conversation Switching", instead I used the
"vaVars.global_search_text = vaInputs.user_input;
vaSystem.topicDiscovery();"

And worked perfectly

rossida
Tera Contributor

Hi @AnaBeatrizA 

 

I too am straggling with this but HOW did you get it to work? Did you set the Decision Branch to "Always" and then pasted your code above into the function? 

AnaBeatrizA
Tera Guru

"always" on decision branch is going to depend on your conditions. this video has an example: https://www.youtube.com/watch?v=2--Z_2hKA_c&t=160s

This video discusses about the Script Variables in Virtual Agent. Covered: 1) vaInputs 2) vaVars 3) vaContext -------------------------------------------------------------------------------------------- vaSystem will be discussed in the following video https://youtu.be/gnl65Fa-gjI ...