This topic describes how to configure the Branching by Conditions node. This node enables a chat flow to have different branches by using multiple conditions.
Node information
Node icon
Node name
Branching by Conditions
Prerequisites
You have accessed the chat flow orchestration page. Perform the following steps to go to the chat flow orchestration page: Log on to the Chat App Message Service console. In the left-side navigation pane, click Chat Flow. On the page that appears, click the Flow Management tab. Then, click the name of the chat flow that you want to manage.
Procedure
Click the Branching by Conditions icon on the canvas to show the node configuration section on the right side.
Configure the node based on your business requirements. For more information, see the Configurations section of this topic.
Click Save.
Configurations
You can click Add new branch to add a new branch. The following table describes how to configure a branch.
Configuration | Description | Example |
Select a variable | Select a variable for judgment from the drop-down list. You can select a default available variable or a custom variable from the drop-down list. The available variables are displayed in the available variables section. For more information, see Use available variables. | In the following example when And is selected: The subsequent step can be performed only if the language chosen by the user is English and the mobile originated (MO) message from the user contains English. In the following example when Or is selected: The subsequent step can be performed only if the language chosen by the user is English or the MO message from the user contains English. |
Select a matching rule | Select a desired matching rule from the drop-down list. Valid values:
| |
Specify matching content | Specify custom content to match. | |
Specify whether to meet all rules or rule groups | If multiple rules or rule groups exist in a branch, select And/Or to determine whether to meet one or all rules or rule groups. Valid values:
|
Example
In the following example:
If the condition of the Chinese-based branch is met, a message in Chinese will be sent and the subsequent step will continue.
If the condition of the English-based branch is met, a message in English will be sent and the subsequent step will continue.
If the conditions of the two branches are not met, the chat flow will jump to another specified node.