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:

  1. Drag the Choice widget onto the canvas from the Widget Library.
1314

The Choice widget pop-up appears.

372

The Choice widget has the following fields to configure:

a. Variable:

Enter the variable for which the value needs to be matched based on the condition. Supported variables are:

  • {{keypress}}
  • {{caller.country}}
  • {{bridge.country}}
  • {{callee.country}}
  • {{caller}}
  • {{bridge}}
  • {{caller.isdcode}}
  • {{bridge.isdcode}}
  • {{callee.isdcode}}
  • {{caller.isocode}}
  • {{bridge.isocode}}
  • {{callee.isocode}}
  • {{callee}}
  • {{starttime}}
  • {{trigger}}
  • {{flow_start_time}}

Custom variables can also be entered in the text box, for which the value would be derived from the API response.

b. Condition:

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.

c. Value:
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.

Logical Operator
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.

Example:
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.

  1. Click Save to save the changes.
  2. Click Delete to delete the widget.

Sample Choice Widget Flow Diagram:

1296