Updated on 2023-09-20 GMT+08:00

Assign

The call-associated data is carried in a call. The data is stored in the call until the call ends.

Diagram Element

Parameter Description

The following figure shows the parameters of the Assign diagram element.

Figure 1 Assign TransferData
Figure 2 Assign OthersData
Figure 3 Set TransferData
Figure 4 Assign IEData

The parameters are described as follows:

  • Module Description: diagram element name to be displayed, which can be customized as required.
  • Data assignment: Assign a value to the current flow in one of the following ways:
    • Assign TransferData
    • Assign OthersData
    • Set TransferData
    • Assign IEData
  • Prepare assignment parameters: Configure the parameters to be carried when the value of the call-associated data or other data is assigned. Such parameters are used to carry remarks, which do not affect the flow logic.
    • Value: parameter value, which is optional.
      1. Assign TransferData

        Scenario: The agent transfers the call-associated data to the IVR flow. The IVR flow obtains the call-associated data. The call-associated data must be in the following format:

        {"callid":"1598006316-4672","calldata":"{\\\"key1\\\":\\\"v1\\\", \\\"key2\\\":\\\"v2\\\"}","isDataEncoded":"false"}

        The call-associated data is obtained based on calldata.key1 and calldata.key2.

        When a call is transferred from an intelligent IVR flow to a common one, the data is in the JSON format defined by the customer. The customer obtains parameter values by directly obtaining the values of parameters at the first layer and obtaining the values of parameters at the second layer in a.b format.

      2. Assign OthersData

        During data value assignment, in addition to string and integer data, expression calculation is also supported.

        Integer data supports the following arithmetic operations: +, -, *, and% (). Data supports FLOW, GLOBAL, and SYS.

        Example: (FLOW.xxx+FLOW.yyy)*GLOBAL.zzz. Note that when / is used for division, the calculation result needs to be received using data of the string type. Integers do not support decimals.

        Character string data supports comparison, case conversion, character string concatenation, substring calculation, and length calculation.

        Example: FLOW.aaa=="Huawei" FLOW.bb.to FLOW.a.toUpperCase() FLOW.A.toLowerCase() FLOW.hua+FLOW.wei FLOW.len.substring(0,3)FLOW.zzzz.length()

      3. Set TransferData

        When the IVR flow is running, you can set the call-associated data through this parameter to transmit data with sessions.

        The call-associated data must be in key-value format. Multiple key-value pairs can be set and are combined as follows: {"data":{"key":"value","key1":"value1"}}. Agents can obtain the value of this parameter.

      4. Assign IEData

        The IE information transmitted in the flow can be obtained. Currently, only the User To User option is available.

        Click the Prepare assignment parameters text box. The global variable and flow variable lists are displayed for selection.

    • Click New to add a parameter record. The value of Transfer Parameters must be unique in each record.
    • Click Delete to delete the current record.
  • Click Save to save all parameters set on the current page.

Typical Application Scenarios

After an agent sets call-associated data and transfers the call to the IVR, the IVR can obtain the call-associated data from the Assign diagram element, assign a value to a parameter at any time, and add the parameter to a flow variable or global variable.