A common question that comes up is how to handle where the end user makes two utterances, but you only want to take action on one.
The most common being someone saying hello, versus saying hello with a question. You would want the question to take priority.
It’s very easy to do. You just do the following:
- Create your first node with a condition of True and create your priority intents under this. Set your top node to jump to the first in that branch.
- Create your second node which handles greetings.
- Add a True node at the end of your important intents, and let it jump to greeting condition.
And that’s it! But that is the old style conversation way. Just before the new year a new version of conversation was released that makes this so much more simple.
The magic is in the first node.
Here we check to ensure that a greeting hasn’t been mentioned, then check each important intent.
With this method you don’t need any complex branches or jumping around. One important thing is to ensure that your less important intents do not have any training data that may cause it to pick it over the important intents.