The Branch: If/Else action forces your conversational AI application to make a single decision. The decision can follow one of two possible branches.

To determine which branch is processed a true or false (boolean) evaluation is made against condition.

In this example we assume the user has been prompted and asked to supply their age. This value has been read into a user scoped variable user.age. We'll verify the user age and check the contents of this variable.

If the age is less than 21 a message is sent advising the person is too young to place the order.

If the person is 21 or over, a message is sent asking what the person would like to order.

To add a If/Then Else action perform the following steps:

  1. Select the + node and Create a condition then Branch: If/Else

Untitled

The action is added to the designer canvas:

Untitled

  1. Select the action. In the click on the Condition supply the the text =user.age < 21: