Conditions
Conditions allow you to set rules based on which the appropriate block will be displayed to the user. The number of branches and conditions within a single block is unlimited.
Configuring conditions
Adding condition to the block
To add a condition within a block, go to the “Add to block” section and select the appropriate option.
Choosing conditions
You can define the conditions on the left side of the branch. They can be based on the following data:
- User variable – the condition will be met only for those users whose variables have the values specified in the condition,
- Active contest – the condition will be met only when there is an active contest for the bot,
- Time range – the condition will be met only within the specified period,
- Recurring date – the condition will be met only on the specified days of the week within the selected time frame.
More information about the conditions can be found here.
Displaying blocks
While defining the branch, you can choose what the user should see if the specified condition is met. This can be:
- A message with buttons defined directly in the branch,
- Any block defined in the bot’s structure,
- A block saved in the user’s variable.
If the user does not meet any of the set conditions, the next element from the block or the next block in the structure will be displayed to them.
Activating and deleting conditions
You can delete a single condition or the entire element block. You can do this by hovering the mouse over its area. In the upper left corner of the single condition or the entire element, a trash can icon will appear – click on it and confirm the action.
If you want to keep a branch in the bot structure but temporarily disable it, click on the condition and find the “Active condition” option in its settings. Then deactivate the switch – the branch will be disabled from the structure, but you will still be able to return to it.