Updated on 2024-10-12 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}.

Adding a Global Variable

  1. Choose Configuration Center > Chatbot Management > Flow Configuration.
  2. Choose Resource > Variable and click .
  3. Set Variable Name and Data Type, as shown in the following figure.
  4. Select an encryption type and click Confirm.

    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.

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 .