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 achieve 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 our 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:

input.slots.issue

Save your Node.

Progress

 

#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 use the type "Slot". In the field "Slot name" enter "issue" which was used as the Slot in the Lexicon. The text could be "What type of issue do you have?" 

Progress

 

#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 it if you like.

Progress

 

#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 the type of the problem. Saying "I want to open a ticket for my laptop" will instantly progress through the entire Flow by running through the "Then" branch of the If node.

Progress

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


Comments

0 comments

Please sign in to leave a comment.

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