Creating blocks and the types of them
The article describes all types of blocks, fields of forms input and shows how to work with them
Blocks are bot answers and a kind of "state" in which the customer is. Transition to another block (change of the customer’s state) occurs due to the conditions (arrows and keywords).
Arrows are transition conditions. In essence, the arrow performs the role of distributor: if the customer chose "Answer 1", he moves to Block 1, if he chooses "Answer 2", he moves to Block 2 and so on.
Read more about arrows in our article Transition conditions
Today we will tell you about the types of blocks, how to create them and what they are for. To create a block, you need to select the block type in the "Creating a message" menu to the right (the default is "Dialogue State"), in the "Message text" field, type the message that the bot should send to the customer and click "Save".
Let us elaborate on each of them.
Start dialogue: block with condition, has a pale green colour. If you write the keyword/phrase in the "Condition" field, the bot chain will start from this block when the user writes to him the specified keyword/phrase. In the figure below is an example, with the keyword to start the bot after the user enters the word "Start".
Dialogue State: White block without condition. You can only switch to it by arrow. It is designed for intermediate responses, forks, sending several messages one after the other at certain intervals.
Primary condition check: The bright green block has the highest priority. The entire bot chain can also be run from it. The main difference from the block "Start dialogue" is that the conditions in these blocks are checked first. If the customer enters a keyword/phrase from this block during the dialogue with the bot, it will immediately move to it.
Example , if you communicate with a bot and write the word "Start", you will move to this block and the bot will answer you "Hello!".
Data transfer: a block without condition, has yellow colour. It is used to transfer data (values of variables) to the CRM system, to email or personal messengers of the bot owner without resetting this data in the constructor. Thus, the data can be used for calculations or other actions even after transmission.
End of data collection: a block without condition, has a red color. The main task of these block type is to form a request. When moving into this block, all collected data (values of variables) about the user are sent to the CRM system, to email or other social networks in the form of a prepared request. After the variable values are transferred, they are deleted from the constructor
Types of blocks "Not a state" and "Not a state with a condition" require more detailed consideration, so they are described in this article.