Let your Virtual Agent respond to Keyphrases

Use the Lexicon in your Flow to streamline the conversation!

Combining Intent recognition with a Lexicon allows users to use a variety of expressions to achive their goals directly or indirectly. At the same time, the Flow can remain simple and well-arranged.

#1 Add an If Node

Go to the Flow Editor and add an If Node after the Say Node in the "createTicket" branch. Learn more about If Nodes in the developer documentation. Your aim is to check if a user with a "createTicket" intent already expressed their exact issue by using a Keyphrase or Synonym from the Lexicon. Switch to the "Advanced Editor" and enter the following condition:


Save your Node.



#2 Use a Question Node to capture the Keyphrase

If no Issue exists (Else branch) the Virtual agent should ask for it. Add a Question Node under Else and and use the type "Slot". In the field "Slot name" enter "issue" which was used as Slot in the Lexicon. The text should be "What type of issue do you have?" 



#3 Add a Say Node and give the user feedback

The Flow has now gathered information about the user's intent and the type of issue. After the junction of the Then and Else branches, add a Say Node to prompt

Ok, I'll create a ticket about your {{input.slots.issue[0].keyphrase}} issue

The expression in the curly brackets will prompt the Keyphrase from the first issue that was recognized based on a Lexicon slot.

#4 Clean up the conversation

To avoid double messages, select the Say Node under "createTicket", open the More Options menu and select Disable. You can also delete if if you like.



#5 Try it out!

Test the experience in the Interaction Panel: Users can now say "I have a problem" and will be asked a question to specify. Saying "I have a problem with my pc" will instantly progress through the entire Flow.


#DONE! Off to the next journey: Send HTTP requests and customize your Virtual Agent!



Please sign in to leave a comment.

Was this article helpful?
0 out of 0 found this helpful