Table of Contents

WhatsApp - Get user out of error message loop

Jonathan Goodfellow Updated by Jonathan Goodfellow

Sometimes, users can get stuck in a question loop and cannot get out of it! They may even leave the bot and return later to find that any input will still return them to the same place in the bot.

There is a way, however, for users to 'escape' this loop and be redirected back to the beginning of the bot safely.

We will use this flow as an example, but you can adapt it to your needs:

  1. The Start

This is not mandatory, but using a Set Variable to capture the first text that the user types, and then storing it in a variable, gives us more freedom to add other conditions afterward. We recommend this as a first step:

  1. Then we have our flow:

As you may notice, we use Keyword Options instead of Buttons:

Keyword Options is a better option than the Buttons block, especially for WhatsApp. The Buttons block is not suitable for what we are trying to do here!

For more information about the Keyword Options please check this article.

  1. Global Keywords

Now we will use the Global Keywords block. It will connect a specific 'keyword' to the beginning of the bot. That way when the user types the keyword the user will stop being 'blocked', and will restart the bot

In this example when the user types 'restart', no matter where the user is the flow, they will be redirected to the start of the bot.

For more information about Global Keywords, please check this article

  1. Custom System Messages

Now, from the Settings > Custom System Messages, we need to activate "Make each question validation error customizable"

  1. Customize with keyword validation error messages

As is displayed below, first we need to activate the validation error in every user input block :

Then add a sentence that will guide the user to use the desired keyword. In this case we are using 'restart'

And now we can see the result of how typing 'restart'. The bot flow starts from the beginning:

How did we do?

WhatsApp - How to direct a user through a different bot flow on their second visit

Contact