How to Make a Custom Error Message in

Sam Ursu
Sam Ursu
Feb 28 · 5 min read

I’ve helped more than a few clients set up some very engaging chatbots using the dual system.

The drag-and-drop design interface is fairly intuitive and easy to use. The pricing structure is about average. And if you are doing a lot of “human operator” chats that you want backstopped by a chatbot, then the CB/LC combo is a pretty effective one.

That being said, the way that is currently set up, there is no way to set up an error message for an invalid user input. This can be a particularly painful issue when you’re trying to capture data like a user’s email address, phone number, or URL.

Luckily, there is a rather tedious but effective workaround.

The Cloning Solution

Let’s say that you want to do some “lead generation” and ask for the user’s name and email address.

Asking the name part is pretty simple.

First, create a block (interaction) that will ask the user for two pieces of information: their name and email address. I’ll call it “Get Contact Info”.

Open “Get Contact Info” and then select “Ask Question” from the sidebar.

Then set up your first question like this:

The validation type is “sys.any” which means that any input from the user will be considered valid. There’s no way for any computer system to know if a person’s name is real or not, so all inputs will be considered valid.

Make sure that you choose “Don’t ask” for “If attribute exists.”

Now onto asking for the user’s email, which is the tricky part:

Select the “Validation type” to be “” because you want the bot to ensure that the inputted email follows the standard format.

Note: The chatbot isn’t going to actually test the email address. It’ll accept any input in the “email format” of name @ domain. So an email address like “” would be accepted as valid.

The problem arises when the user does not input an email address in the right format. lets you ask the user for their email multiple times, but it’ll just repeat the same question (“What is your email?” from the above example) over and over and over again.

Well, that’s not very helpful to the user, and it makes the chatbot look extremely dumb.

The way to create a custom error message is first, only ask the user’s email ONCE. Then, make sure “Action on failure” is set to “show next message.”

That “next message” is going to be a “Go to Interaction” that is an exact clone of your original block (interaction).

Click on the little “+” sign to create a new block and then choose “duplicate.” Go ahead and duplicate your “Get Contact Info” flow.

I’ve named the duplicated interaction “Get Contact Info Fallback.”

Now, go back to your original Contact Info flow. Then click “Go To” in the sidebar.

Then tell the chatbot to go to the interaction (block) “Get Contact Info Fallback” after it has asked for the user’s email one time.

Now comes the fun part!

Open the “Contact Info Fallback” sequence.

Make sure you leave the question about the user’s name unchanged. Since the bot will already know the user’s name, it won’t ask the user the question twice.

Just change the text for how it asks for the email address:

If the user initially failed to input a valid email, the bot will now ask the user for their email twice using the “error message” text listed above.

But… if the user DID input a valid email the first time, the fallback sequence will not ask them for their email again because “If attribute exists” has been set to “Don’t ask.”

Instead, it’ll skip down to the next message in the block (interaction).

From there on out, you can design your chatbot normally.

Collecting Attributes for LiveChat

Since most users are also using LiveChat, then it’s essential that your fallback sequence REPEAT the question about the user’s name, even though the user won’t actually be asked for their name twice.

The reason you need to repeat it in the fallback sequence is because only retains the user’s inputs from a single block (interaction). So, essentially, you need to trick into acting like it asked for the user’s name twice just so that it can “remember” that it collected that attribute when it writes a LiveChat ticket (or hands off to a human operator on LiveChat).

Stacking Error Messages

If you really want to go the extra mile, you can also stack “Go to” fallback sequences for all the verifiable user inputs such as telephone numbers and URLs (websites).

I don’t really recommend this since typing any nonsense number will be interpreted as being a “valid” phone number, and “verifying” a URL isn’t all that high of a priority for most use cases.

Normally, just ensuring that you’ve captured a valid email is enough for “lead generation” purposes. And the bot returning a custom error message is usually enough to separate the jokers from the people genuinely interested in giving you their email address.

Have fun designing your chatbots, everybody!

Sam Ursu

Written by

Sam Ursu

The best way to reach me is by email at:

The Chatbot Guru

An expert’s view on the emerging field of digital assistants.

More From Medium

More from The Chatbot Guru

More from The Chatbot Guru

The Fundamentals of NLP Design


More from The Chatbot Guru

More from The Chatbot Guru

The 3 Types of Chatbots

More from The Chatbot Guru

More from The Chatbot Guru

Designing Chatbot Personalities

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade