I got this question on my YouTube channel:
How do I create fallback followup intent for anything that does not match with the YES followup? When user says "NO" or anything else it should trigger the fallback and end the intent followup but instead it just sends the default response set for NO in the small talks. I want it to send a specific fallback response instead of the default response in case the user says anything except YES
Note: In the rest of the article, I am going to suppose that the Fallback followup intent is not working for this user because of conflicts from the Default Fallback intent. Speaking of which, can you guess why this is the case? 🙂
First, a caveat.
I am not a big fan of using followup intents when conversations need to be precisely managed, like what the reader is trying to do above.
Everything that can be done with a followup intent in Dialogflow can also be done without using a followup intent. Obviously it needs more work, and will also make your overall agent look more cluttered. (Which is also quite questionable, because there is too much visual similarity in followup intent trees). But you will get a greater degree of control over your conversation.
So with all that said - here is one way you can do this. Let us say we ask the user if they are a human in the Default Welcome Intent.
Create a custom follow up intent next to your Yes followup intent.
Inside the training phrase section of the custom followup intent, simply use a single training phrase with a wildcard entity as the entire training phrase.
If user says YES, we fire the yes followup intent (obviously).
If the user says anything other than YES at that point in the conversation, the custom followup intent should fire.
Make sure you change the context lifespans to 1 everywhere to avoid unnecessary conflicts in further followups (see my Better Dialogflow Bots series which explains why this can be a problem).
If you don't have a particularly strong reason to use followup intents for your bot, I would just use simple intents to create this conversation flow. In my view, you get a lot more flexibility and control over your conversation flow if you avoid followup intents.
- Using Collect.chat for preNLU bots
- Reader Question: How to get some sample training data for Dialogflow?
- Getting the top 3 (or top N) intents in Dialogflow: An experiment
- Dialogflow Regexp (regular expression) entity
- Using Dialogflow for educational bots
- Chatbot makes $3 million in sales in 1 hour
- Reader Question: Intent based FAQ bots vs knowledge based FAQ bots
- Should you use Dialogflow from scratch?
- 3 ways Airtable can speed up your Dialogflow prototype development
- Automatically generating a rich Dialogflow website chatbot