Sometimes the user tells you the answer to certain questions earlier than expected. It is important to be prepared for these instances by combining the use of 'Data Actions' and 'Skip Conditions'. This combination will allow the flow to extract information with 'Data Actions' and skip the questions we already know the answers to with 'Skip Conditions'.
Before adding 'Skip Conditions':
User: I'd like to order one Cappuccino
Bot: Ok, what coffee would you like?
User: I already told you, one Cappuccino!
Bot: Ok, a cappuccino will be ready for pickup in 5 minutes.
After adding 'Skip Conditions':
User: I'd like to order one Cappuccino.
Bot: Ok, a cappuccino will be ready for pickup in 5 minutes.
The current stage of the 'User wants to order a coffee' flow doesn't extract the entity if you mention a coffee type in the first input. To do that we need to add another data action on entities but this time for the trigger:
COFFEES_SERVED
.Now it's time to specify when output should be skipped:
orderedCoffeeType
into the 'Skip Conditions' field. This will be evaluated to true if the variable is set and to false if the variable is empty.What we have done here is to tell Teneo: if the orderedCoffeeType has a value when you reach the 'Ask for coffee type' output node, skip it and traverse the path 'User responds with coffee type' without waiting for an input from the user.
Now it's time to test the flow!
User: I'd like to order a coffee.
Bot: Ok, what coffee would you like?User: A cappuccino, please.
Bot: Ok, a cappuccino will be ready for pickup in 5 minutes.
It is now possible to put all details into one single request:
User: Can I have a cappuccino please?
Bot: Ok, a cappuccino will be ready for pickup in 5 minutes.
Next page is about Handling Interruptions.
Was this page helpful?