Table of Contents

How to use Questions for Chatbot builder?

Using Question Box in Wati Chatbot Builder

The question dialogue box is very simple in Chatbot Builder and it is the most used one.

Parts in Question Box

Question text

In this question box, you can add a question text that would be highlighted on the screen. In the text, you can add variables and emojis. Change the text to Bold, Italic, Strikethrough.

As you can see in the above image there are variables added, variables are anything that are saved answers of the users and which I will talk about later. Anything that follows @{Variable Name} is a variable.

There are also emojis added to make the question look user-friendly.

Add answer variant

It's under the Question Text, which you would provide the user to choose from for the question text that you typed in above.

In the above image, you can see that there are two answer options and we can delete and create more.

When you give a user answer options they have to type in the number according to the answer.

So in this case:

Yes = 1

No = 2

So, if a user types in 1 the answer selected will be "Yes"!

If you want the user to enter a custom answer, you may leave the answer options empty, and then the user can freely answer it.

What if the user does not answer 1 or 2 but answers "hi"? So there is always a fallback option that you could link to the chatbot if the answer is not matched to any answer variant.

It looks something like this:

The last option, "General", is used for a fallback if any answer not matched by the user is there then this would be the ideal option to guide the chatbot forward.

Save Answers in a variable

This field is to store the user's reply value into the variable. This variable then can be used to put into another condition or to display again what value that user chose. The below sample shows one case that can use this part.

Case 1: Store the answer in a variable

Case 2: Check the value of a variable and set the condition

Advanced options (text response)

This option can be used only when the user doesn't specify the "Add answer variant" part. In another word, if the user inputs options in the "Add answer variant" part, "Advanced options" is disabled, and vice versa.

This part is used to put validation against the customer's reply. Depends on which data we want the customer to fill in.


When choosing validation "Number", the user needs to fill in the Min value and Max value.

There is a default validation message, user can also change it to their message eg "Sorry, the number of items needs to be more than 0 and not greater than 1000. Please try again".

The last item of this part is "Exit chatbot if validation failed more than ... times". That is to trigger the exit chatbot if a user still replies wrong after .... times. Users should set up this option, otherwise, customers cannot quit the chatbot if they don't want to ask more related to the current chatbot. If a user still wants the system to keep asking until the customer inputs the correct value, which means ignoring the fallback, the user can fill the ...times = 0 times.


When choose validation Date, user can only input below format: M/d/yyyy, MM/dd/yyyy, M/dd/yyyy, MM/d/yyyy.

For example 1/1/2021, 01/11/2021, 1/11/2021, 01/9/2021

***Date + Time:

When choose validation Date + Time, user can only input below format (validating against the 12-hour clock):

  • M/d/yyyy h:mm:ss tt (1/9/2021 8:00:00 AM)
  • M/d/yyyy h:mm tt (1/9/2021 8:00 PM)
  • MM/dd/yyyy hh:mm:ss (12/25/2020 03:59:05)
  • M/d/yyyy h:mm:ss (1/9/2021 8:00:00)
  • M/d/yyyy hh:mm tt (1/9/2021 11:50 PM)
  • M/d/yyyy hh tt (1/9/2021 11 PM)
  • M/d/yyyy h:mm (1/9/2021 8:00)
  • MM/dd/yyyy hh:mm (12/29/2019 03:30)
  • M/dd/yyyy hh:mm (1/19/2020 09:20)


When choose validation Time, user can only input below format:

  • hh:mm tt (02:35 PM)
  • h:mm tt (2:37 PM)
  • HH:mm:ss (14:37:21)
  • H:mm (8:25)
  • HH:mm (08:57)
  • H:mm:ss (8:57:00)
  • hh:mm:ss (02:37:00 )
  • h:mm:ss (2:37:00)
  • h:mm (2:37)
  • hh:mm (03:36)
  • h:mm:ss tt (2:37:00 PM)
  • hh:mm:ss tt (02:37:00 PM)

***Pattern (regex):

When choose validation Pattern (regex), user need to fill in Regex pattern format, some example patterns below:

To filter for a name (alphabets and no numbers or emojis): ^([a-zA-Z\s]+)$

To filter for an email address: ^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$

To not allow emojis: ^(?!.[^\u0020-\u007e\u00a0-\u00ff\u0152\u0153\u0178])$

To filter for something like an Instagram handle (e.g ^instagram\.com/([a-zA-Z0-9_\-\.]+)$

Chatbot example:

Accept a media response

Previously, if the user sends a media file to the chatbot, the chatbot will end abruptly without any error message. Now, you can set so that the chatbot will be able to accept a media file.

For the list of supported media types, you can check this article: Supported media types & sizes on WATI

Advanced options (media response)

This option can be used to check if the user send the correct required file. For example, if the chatbot requests an image and the user sends a PDF, this will trigger the validation error message.

Download a media response

When the option to save the answer of a media response is enabled, the file directory will stored in the variable. You can then use the getMedia endpoint to download the file on your end.

How did we do?

How to use Conditions for Chatbot Builder

How to build a chatbot?