How to manage the wrong entry of an email or a number

Handling a variable type error for the“User input” feature

When you choose the variable type “Email entry ” or ” Digit entry“, if the answer entered by the user does not match the corresponding type, the chatbot considers it an error and will replay the sequence to ask the question again. However, in terms of user experience, it is very frustrating to be asked the same question over and over again without any explanation.

In this tutorial we will deal with this situation.
Our goal is to display an explanatory text in case of an error.

We know that in case of error the sequence is replayed, so we must find a way to display a different text depending on whether it is the first time the question is asked or if it is the second.

This is possible by using the following two features:

We start by creating a variable “Email_pass” whose value will increase by 1 at each passage on the sequence.

So at the first pass this variable will take the value 1 then 2 or more if the user makes multiple errors.

Now we need to create a condition that will change the text of the question depending on the number of passes.

The condition must be configured as follows:
IF the variable “Email_pass” is equal to 1
THEN we will assign the value “Please enter your email:” to the “Email_text” variable (valid for the 1st pass)
OR we will assign the value “Attention, please enter an email like” to the variable “Texte_email” (valid for all other passages)

Then we use the “Email_text” variable to ask the question in the “User input” feature. Thus, the question will be asked differently depending on whether it is the first time or the following ones.

This is what’s its like for the user :

You can adapt this tutorial to the detection of a number, it is the same mechanics.

Create your Chatbot Easily and for Free!