Condition block
The Condition block in J‑Graph allows the bot to execute different reactions depending on some condition.
tip
A condition is a JavaScript expression evaluated to
true
or false
.
Conditions can contain references to any built-in or globally declared variables, functions, and services.- Specify the condition as a JavaScript expression in the if field.
- Under the if field, configure the reactions that will be executed when this condition is true.
caution
Each condition branch may contain an arbitrary number of reactions, including other Condition blocks.
It is advised to keep the nesting level at three levels at most.
- Select Add else if you need to configure alternative reactions. They will be executed if the condition is false.
- You can change else to elseif. Each elseif can contain an alternative condition, which will be checked if the previous one is false.