All Products
Search
Document Center

Chat App Message Service:Conditional Branch

Last Updated:Mar 23, 2026

This topic describes how to configure the Conditional Branch component. You can use this component to define multiple conditions and control how a flow executes.

Component information

Component icon

Component name

条件分支@1x

Conditional Branch.

Preparations

Go to the canvas page of an existing flow or a new flow.

  • Go to the canvas page of an existing flow.

    Log on to the . Choose Chat Flow > Flow Management. Click the name of the flow that you want to edit. The canvas page of the flow appears.

    image

  • Create a new flow to go to the canvas page. For more information, see Create a flow.

Procedure

  1. Click the Conditional Branch component icon on the canvas. The component configuration pane appears on the right.

    image

  2. Configure the component data as needed. For details, see Configuration items.

  3. Click Save in the upper-right corner. In the message that appears, click Save.

    image

Configuration items

Click Add Add Branch to add a new branch. Configure each branch as follows:

Configuration item

Description

Example

And/Or

If a branch contains multiple rules or rule groups, use And/Or to set how the rules are evaluated.

  • And: All rules or rule groups must be true.

  • Or: At least one rule or rule group must be true.

And example: The subsequent operations are executed only if userChooseLanguage is English and incomingMessage contains English.image

Or example: This example means the next step runs if either condition is true: userChooseLanguage equals English, or incomingMessage contains English.

image

Add Rule, Add Rule Group

In a branch, click imageAdd Rule. Each rule includes Please select a variable, Please select an operator, and Enter a value. You can also click imageAdd Rule Group in a branch. A rule group can contain multiple rules and nested rule groups. Before each rule group, use And/Or to set how its rules are evaluated.

image

Please select a variable

Select a variable from the dropdown list. Variables come from the default available variables and custom variables in the Available Variables list. For more information, see Use available variables.

image

Please select an operator

Select an operator from the Please select an operator dropdown list. Options include the following:

  • stringStartsWith: String starts with.

  • numberLessThan: Number is less than.

  • stringAnyMatchesRegex: Checks if a string matches a regular expression.

  • stringEquals: String equals.

  • stringEqualsIgnoreCase: String equals (case-insensitive).

  • stringIsNumber: String is a number.

  • numberEquals: Number equals.

  • stringContains: String contains.

  • stringIsBlank: String is empty.

  • stringIsNotBlank: String is not empty.

  • numberGreaterThan: greater than.

  • stringEntireMatchesRegex: String fully matches a regular expression.

image

Enter a value

Enter a custom value to match.

image

Component configuration example

image

This example shows:

  • If the user meets the Chinese branch rules, the flow sends a Chinese message and continues.

  • If the user meets the English branch rules, the flow sends an English message and continues.

  • If the user does not meet any branch rules, the flow goes to the else branch, jumps to a node, and continues.