Variable comparison

You can perform logical operations

Variable name cannot start with a number. Variable name cannot consist of two words, use the "_" underunderline character to separate

Supported operators:

"+": addition

"-"': subtraction

"*" multiplication

"/": division

'"%'": remainder of division

" ^ " "**": degree

"==" "!=" " >" "<" ">=" "<=": comparison operators

"and" "AND" "&&": Logical AND

"or" "OR" "|"|": logical OR

To verify an empty variable or not, use the expression: "#{value}" == " "#{value}" != "" Where value is the variable name.

Maximum expression length: 1000 characters

How to Compare Variables

You can compare variables in the "Variable for comparison" field

The comparison variable works with the condition. That is, both the condition and the variable condition must be met for comparison.

If you specify a simple variable name without an expression in the comparison box, the condition will be compared to it, not to what the user has entered. For example, in the figure below, the client from Whatsapp is checked (the variable client_type in Whatsapp is 6 )

The example below works identically

I’ll show you how to use it.

The bot asks the age if it is less than 18 years old, the bot responds that the person is a minor, if more, then an adult.

Notice there’s an unanswered block in the schematic, and there are timer arrows coming out of it. This block is specifically designed to show how to construct a schematic if the bot reacts not to the action of the user, but to the result of the calculation. In the first step, the answer to the variable is saved, and then the comparison takes place. The delay on the arrows is 0 for the instant response.

Important!!! the condition for the age of majority is strict, that is, more and equal to 18. Very often make mistakes of such a plan.

Or for example, you can write either more 18 or equal to 18

Condition errors


Number cannot be both greater and less than 18

This condition is meaningless. all numbers less than 18 or more are 18

Last updated