Skip to main content

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.
  1. Specify the condition as a JavaScript expression in the if field.
  2. 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.
  1. Select Add else if you need to configure alternative reactions. They will be executed if the condition is false.
  2. You can change else to elseif. Each elseif can contain an alternative condition, which will be checked if the previous one is false.
Condition block