Basic blocks - Question

Block "Question" - this block allows you to ask a question to the user and when you get an answer to write it into a variable, which can later be used with the block "message" for personalized communications.

If the variable is not set, the system will generate an error:

 The "Question" block allows you to accept and record any information sent by the user in a given format and, when the answer is given by selecting the button, redirect the user through the script depending on the answer. All user variable values can be viewed in the "Chats" section in the user card to the right of the dialog with the user, these fields are filled in as the script runs. Variables not only allow you to build personalized communication with users, but also to perform various calculations according to the parameters set by the user (e.g., calculating the required number of calories per day for the parameters of weight, height, and age entered by the user).

When creating the "Question" block, you must specify the variable where the user's answer will be written. Please note that if you ask the user a question and specify that the answer should be given in numeric format, and the user sends the answer in text format, an error will occur and the information will not be written to the variable. In the same way you can ask a question "What city do you live in?" and the answer choices will be in the form of buttons "Moscow" and "Perm", and the variable will be written, for example, in "city".

In this case, the response transmitted by pressing one of the buttons will be written to a variable and the user will move on to the script, which is intended for those who live in "Moscow" or "St. Petersburg" depending on the answer selected.

Please note that if there are answer options in the question block, but the answer will not be given by button, but by text, the system will give the user an error.

In the design of Chat-API there is a "Magic Button", which allows the user to share data contacts by clicking on this very button. To do this, you need to select the menu items (buttons) type "Number". When selecting this type, the user will see the usual button, by clicking on which he can automatically share the number linked to the account in Telegram.

Was this article helpful?

Your opinion will be used to improve the content of the article

The Most Multifunctional WhatsApp API Provider

Chat API has been operating since 2015 and is one of the first and largest providers in Eastern Europe.

Here are some curious and important figures:

  • We have tremendous expertise in docker container management at scale with an SLA of 99.5+%;
  • Chat API involves in its work more than 200 servers, with the ability to quickly connect another 100;
  • 3200 cores and 25 terabytes of RAM;
  • 200+ WhatsApp methods and features that keep adding;
  • Highload system, Up Time servers 99.9%;
  • Support 24\7;
Get access to the WhatsApp API