Decision Node

1. Introduction

The Decision node is used to direct the user flow based on the interaction between the user and the bot. Values and attributes collected through the conversation can be passed into the decision node to direct the conversation flow.

1.1 Availability

A decision node can be selected from the node menu.

2. Steps to configure 

In the decision, node attributes are passed and checked for various logical operations. Configured by you.

2.1 Conditions 

You have to define the condition of the attribute you want to check in the decision node. For example, if you want to check if the user’s age is greater than 18 or not. You are storing the user’s name in an attribute user_age.

  1. Type “{“ beside the field A1 and all the attributes would be listed down in a dropdown menu, select the attribute {{user_age}}.
  2.  Next to the attribute, you selected to select the condition is greater than.
  3. For this example the value is set to 18 since you want the user_age attribute to be greater than 18, or else you can set it to any number or value you want.
  4. You can set multiple conditions on a single attribute or multiple attributes.
  5. You can add more conditions by clicking the + symbol and delete conditions by selecting the – symbol.

2.2 Evaluation Expression

In this field, you are required to enter the expression for the logical operation. Logical operations like AND, OR are permitted.

In case of a single attribute condition, you are required to enter A1 as the evaluation 

Expression.

For example, if you want to evaluate two or more conditions together you can use the expression A1 AND A2A1 OR A2 and so on. What this would mean is the user_age should be less than 18 AND passport_id should be valid only then the condition is true or else false. 

Note: The output of the Decision expression is in the form of either True or False. Therefore you can set the flow accordingly.

3. Sample Examples 

You can use the drag and connect to other nodes.

Was this article helpful?

Related Articles

Leave A Comment?