I have a Lexicon called Product. After the user says something I want to test/branch if a Product Slot was filled and prompt them, more directly, for a product name if it was not. What is the best way to do that?
Test Lexicon Hit

Didn't find what you were looking for?
New post-
Mike Pilman
I will expand this before anyone answers.
I would like to test to see if there is a value in a slot and an Intent before I go on. I have been trying to use "Add to Context" to store the Slot and the Intent Tokens but I can't figure out how to test the tokens for a value. Any value.0 -
Edwin Wortel
Hi,
All input Text is stored in the input object.
Based upon the value in the input text you can make decisions with an If-Node, or a Lookup-Node
In this case I have a lexicon with 'Food' like burgers, Pizza, Salads etc.
I activated the Expert Mode in the Interaction panel Settings to see if my input hits an Intent and/or a lexicon slot.
You can also check in the Info --> input tab of the Interaction Panel.Based on the value in a found Lexicon Slot I make a decision to go into another branch of the flow.
In the Lookup Node I entered this operator: input.nlu.detailedSlots.food[0].keyphrase and in the Case-node I look for a particular value (Salade). When that value is an exact match with the value in the Operator, it follows that path.
Hope to have answered this question,
Edwin Wortel,
Solution Architect,
Cognigy0
Please sign in to leave a comment.
Comments
2 comments