All Products
Search
Document Center

Chat App Message Service:Branching by Conditions

Last Updated:Jun 20, 2025

This topic describes how to configure the Branching by Conditions component, which allows for the combination of multiple conditions to alter the execution path of a flow.

Component information

Icon

Conditional Branch Icon

Name

Branching by Conditions.

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 Chat App Message Service Console. 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 Branching by Conditions icon on the canvas to view the configurations on the right.

    image

  2. Configure the component based on your needs. For more information, see Parameters.

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

    image

Parameters

You can click Add Branch to add a new branch. The following table describes the parameters about branch rules.

Parameter

Description

Example

And/Or

If the branch has multiple rules or rule groups, configure the evaluation method by selecting And/Or.

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

  • Or: Any one of the rules or rule groups must be satisfied.

Example of And: This example indicates that subsequent operations will only be executed if both userChooseLanguage is English and incomingMessage contains English are satisfied simultaneously. image

Example of Or: This example indicates that subsequent operations will be executed if either userChooseLanguage is English or incomingMessage contains English is satisfied.

image

Add Rule, Add Rule Group

You can click imageAdd Rule in the branch. The rule includes Please select an operator, Please select a variable, and Please enter. You can also click imageAdd Rule Group in the branch. The rule group can contain multiple rules and rule groups. Each rule group must be preceded by And/Or to configure the evaluation method of the rules.

image

Please select a variable

Select a variable to be evaluated from the Please select a variable drop-down list. These variables come from the default active variables in the active variable list and user-defined variables. For more information, see Use available variables.

image

Please select an operator

Select a rule from the drop-down list. The rules are as follows:

  • stringStartsWith: String starts with.

  • numberLessThan: Number less than.

  • stringAnyMatchesRegex: String partially matches regular expression.

  • stringEquals: String equals.

  • stringEqualsIgnoreCase: Checks if two strings are identical ignoring the case.

  • stringIsNumber: String is a number.

  • numberEquals: Number equals.

  • stringContains: String contains.

  • stringIsBlank: String is empty.

  • stringIsNotBlank: String is not empty.

  • numberGreaterThan: Number greater than.

  • stringEntireMatchesRegex: String entirely matches regular expression.

image

Please enter

Enter custom content to be matched.

image

Configuration example

image

In this example:

  • When the user satisfies the Chinese branch rule, a Chinese message will be triggered for sending, and the flow will continue.

  • When the user satisfies the English branch rule, an English message will be triggered for sending, and the flow will continue.

  • When the user does not satisfy any branch rule, the flow will enter the "else" branch, triggering a jump to the node component, and the flow will continue.