Home / Conversation Design / What if the exact text in the user phrase does not fire the intent?
Conversation Design | DialogFlow ES

What if the exact text in the user phrase does not fire the intent?

Website Name Change

I have changed the name of this website from Mining Business Data to BotFlo. I am offering a 60% off discount on both my Dialogflow ES and Dialogflow CX courses till April 20th 2021 for people who can help me spread the word about my new website.

I got a comment recently on my post about intents which don’t match like you might expect.

This is an extremely unlikely scenario. But here are some troubleshooting tips.

Make sure the input context matches

In a previous article, I shared an example of an intent in my SupportBot where people express interest in coaching.

The intent definition for the “Coaching” intent looks like this:

For this intent to fire, the context must already be set to awaiting_service_choice. If you have a wrong context set, the intent will not fire even if the words are an exact match.

Make sure the previous intent was mapped correctly

When you set contexts in this fashion, in fact, usually it is quite likely something went wrong in the previous intent itself.

For the example I have shown above, the user needs to have first seen a list of menu options on the page before choosing coaching. When the menu intent fires, it sets the output context to awaiting_service_choice which in turn allows the next input to match the correct intent.

If the menu intent never fired, then the output context awaiting_service_choice was never set. This means you cannot map the “Coaching” intent in the next step.

Make sure you have Reset Contexts if you are working inside the Dialogflow console

If you are doing your testing inside the Dialogflow console, remember to “Reset contexts” when you go from one conversation to the start of the next one. (This is especially true if you are in the habit of setting large context lifespans – yet another reason why you should choose a context lifespan of 1).

If all else fails, log out, log back in and try again one more time

If you are testing with the Dialogflow console, try to log out and log back in. I remember exactly once when this helped. 🙂

But it didn’t happen again, so I am not sure why it helped.

Similar Posts