You can logically branch the flow based on conditions. Helps the end-users to take the flow ahead based on certain conditions. There are three components supported by this widget. They are Variable, Condition, and Value.
The Choice widget has two output branches:
- Match —If the variable and the value satisfy the selected condition, then the flow will navigate to the Match branch.
- No Match —If the variable and the value do not satisfy the selected condition, then the flow will navigate to the No Match branch.
To use the Choice widget, perform the following steps:
- Drag the Choice widget onto the canvas from the Widget Library.
The Choice widget pop-up appears.
The Choice widget has the following fields to configure:
Enter the variable for which the value needs to be matched based on the condition. Supported variables are:
Custom variables can also be entered in the text box, for which the value would be derived from the API response.
Click on the arrow next to select a condition to view the list. The available options are Equal to, Not Equal to, Less than, Greater than, Less than or equal to, and Greater than or equal to.
Enter the value for which the variable needs to be matched based on the condition. The dynamic variables mentioned under the “Variable” field are supported here as well.
You can combine two expressions with a logical operator if required. Only one logical operator can be selected in a choice.
There are two operators supported.
AND - If both the expressions are satisfied, then the flow goes to the following Match branch.
OR - If at least one of the expressions is satisfied, then the flow goes to the following Match branch.
Another expression can be added in the same widget by clicking on “Add another Choice”. A maximum of 5 choices can be added to a single widget.
Suppose you define a choice by entering keypress as a variable and select a condition as greater than by providing a value field that is set to 5. When a Caller calls the bridge number and enters a key greater than 5, then the Match flow will be executed. If a key less than or equal to 5 is entered, then the No match flow will be executed.
- Click Save to save the changes.
- Click Delete to delete the widget.
Sample Choice Widget Flow Diagram:
Updated 8 months ago