Recognize a Phone Number

更新时间:
复制 MD 格式

The Recognize a Phone Number component extracts the calling code or two-letter ISO country/region code from an international phone number variable. It outputs the result as a new variable for downstream use. You can configure branches to handle different countries or regions.

Component information

Icon

Name

Recognize a Phone Number icon

Recognize a Phone Number

Prerequisites

To configure this component, access the flow canvas by using an existing flow or creating a new one.

  • Go to the canvas of an existing flow

    In the Chat Flow > Flow Management > Flow Name

  • Create a new flow to open its canvas. For more information, see Create a flow.

Procedure

  1. On the canvas, click the Recognize a Phone Number icon to open its configuration panel.

    In the configuration panel, select the incomingMessage variable from the Input Settings dropdown list. Leave Enable Multi-Branching turned off. For Output Type, select Calling Code and set Output Code Variable Name to phonecode.

  2. Configure component parameters as described in the Parameters table below.

  3. After you finish the configuration, click Save. In the dialog box that appears, click Save.

Parameters

Parameter

Description

UI description

Input Settings

Select a variable that contains an international-format phone number. Available variables are defined by preceding components in the flow.

From the Input Variable dropdown list, select a variable set by a previous component.

Multi-branching Settings

Creates separate logic branches based on the phone number's origin.

Branch by Calling Code or Region Code. Select a value in the Branch dropdown list, such as 86. Click Add Branch to add branches or the delete icon to remove them.

Output Settings

Sets the output variable name and format.

In the Output section, select Calling Code or Region Code as the Output Type. Enter a variable name, such as phonecode, in the Output Code Variable Name field.

Calling Code

Creates a branch for a specific calling code. For example, a branch for 86 handles all phone numbers with the +86 prefix.

Region Code

Creates a branch for a specific two-letter ISO region code. For example, a branch for CN handles all phone numbers from that region.

In Multi-branching Settings, turn on Enable Multi-Branching. For Branching by, select Region Code. Click Add Branch to add region codes.