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.