Updated on 2025-11-07 GMT+08:00

Managing Variables

Variables are used in dialog flows to store data generated during flow execution. Variables defined in a flow can be used only in this flow. If a variable is involved in multiple flows, you need to define the variable as a global variable. Global variables can be referenced by all flows. Global variables are used in flows. The format of a global variable is ${GLOBAL.ParamName}.

Prerequisites

Some operations under the current menu are controlled by separate permissions. If related operation permissions are not configured, the corresponding operations are not supported. For details about the operation permissions that can be configured separately, see Table 1.

Adding a Global Variable

  1. Choose Configuration Center > Chatbot Management > Flow Configuration.
  2. Choose Resource > Variable and click . In the dialog box that is displayed, set Variable Name and Data Type, and click Save.

    Figure 1 Create Variable page

    For security purposes, set Encryption Type to Encrypted for storage and decrypted upon retrieval or Encrypted for storage and retrieval if the variable contains personal data, such as the customer ID card number.

  3. Click to import a ZIP file in JSON format.

    Figure 2 Import Variables page

  4. Click to export variables.

    Figure 3 Page for exporting variables

Modifying a Built-in Variable

  1. Choose Configuration Center > Chatbot Management > Flow Configuration.
  2. Choose Resource Management > Variable Management and click the Built-in Variable tab.
  3. Click Edit in the Actions column of one of the following built-in variables and change the default value based on site requirements.

    Table 1 Built-in variables

    Variable Name

    Description

    Data Type

    Value Range

    Default Value

    language

    Use this variable to set the language of the tenant.

    Character

    • Chinese
    • English
    • Spanish
    • Arabic
    • Thai
    • Portuguese
    • French

    Chinese

    timezone

    Use this variable to set the offset of the time zone in which the tenant resides.

    Floating-point number

    –12 to 12

    None

    channeltype

    Use this variable to set the channel of the tenant.

    Character

    default

    default

    responsestyle

    Use this variable to set the style of the tenant.

    Character

    default

    default

    ttsSpeed

    Use this variable to set the TTS speech speed of the tenant.

    Integer

    –500 to 500

    0

    ttsVolume

    Use this variable to set the TTS volume of the tenant.

    Integer

    0 to 100

    50

    ttsPitch

    Use this variable to set the TTS fundamental frequency of the tenant.

    Integer

    –500 to 500

    0

    voiceName

    Use this variable to set the TTS speaker of the tenant.

    Character

    • Graceful
    • Mature
    • Soft
    • Sweet
    • Natural

    Graceful

  4. After the modification is complete, click .