Branch block

The branch block allows the chatbot to split a dialogue flow into two flows. You can use this as an if/else conditional logic.

To add a branch block to a dialogue flow, click the blue chatbot button and select Branch.

To create a new condition, click ADD NEW.

Enter the condition name. The branch block only supports the Python code syntax. The Condition 1 is the if statement and the following conditions are the elif statement. The else statement is created automatically as Otherwise in the branch block.

Once the condition has been specified, it will be saved automatically.

๐Ÿ“˜

Note

There is a maximum of 10 conditions plus the Otherwise (else statement).

Using variables

You can use the variables from a Survey block , JSON API block, Modify Variable block or Proto Variables in the branch condition without the curly bracket delimiter.

If you use a variable from a Survey block please use:

  • variable.text - to represent the string value
  • variable.norm.value - to represent an integer or float value (only if the Type is set as Number)

If you use a variable from a modify variable block, just directly define the variable in the condition field.


Whatโ€™s Next