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

Adding Flows

Flows are classified into main flows and subflows. No obvious business logic division is available for main flows and subflows. A recommended scenario is as follows:

Only one main flow can be configured for a tenant space. If no flow is associated with the access code in Configuring an Access Code, the customer is connected to the main flow directly.

Subflows can be used in other scenarios.

For details about the description and usage of each node in the flow, see Diagram Elements.

Procedure

  1. Choose Configuration Center > Flow Configuration > Intelligent IVR.
  2. Choose Flow Management > Flow Orchestration and click Add.
  3. Set the flow template to Blank Flow. A blank template is used as an example to describe the usage of common diagram elements.

    What are the benefits of using a flow template?

    The flow templates for inbound and outbound calls are preset, including complete recognition nodes, recognition parameters, and branch conditions for processing logic that fails to recognize an intention for three times. You only need to add the corresponding response templates, variables, and branch condition values for the flows. You can use a template to quickly configure a chatbot in corresponding scenarios.

    In the Thai environment, the inbound call flow template and outbound call flow template cannot be selected.

  4. Set flow parameters.

    1. Click + in the Flow Variable area.
    2. In the dialog box that is displayed, set Variable Name and Data Type.

      This variable is used to store data in other diagram elements. According to the plan, you also need to add the following variables:

      • welcome: greeting. The value is a string. The default value is Welcome to the self-service appointment system.
      • answer: response variable for the question asking for the appointed department or doctor or the new date. The value is a string. There is no default value.
      • room: variable for asking for the appointed department. The value is a string. The default value is Currently, the available departments are Internal Medicine and Surgery.
      • doctor: variable for asking for the appointed doctor. The value is a string. The default value is Dr. Liu and Dr. Li are on duty in the current department.
      • check: variable for asking whether to confirm the appointment information. The value is a string. The default value is Are you sure you want to confirm the preceding information?
      • docSlot: appointed doctor. The value is a string. There is no default value.
      • roomSlot: appointed department. The value is a string. There is no default value.
      • dateSlot: appointed date. The value is a string. There is no default value.
      • timeSlot: appointed time. The value is a string. There is no default value.
      • ask: customer reply, which is used for semantic recognition and intention matching. The value is a string. The default value is Appoint ${FLOW.docSlot}'s ${FLOW.roomSlot} at ${FLOW.timeSlot} on ${FLOW.dateSlot}.
      • default: default reply when no intention is matched. The value is a string. The default value is Excuse me, please say it again.
      • thanks: thank-you message. The value is a string. The default value is The appointment is successful. Thank you. Goodbye.
    3. 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 flow variable contains personal data, such as the customer ID card number.

  5. Drag the corresponding diagram elements to the canvas on the right and connect the diagram elements based on Figure 1 and Table 1.

    The following figure shows the flow after the configuration is complete. When configuring a flow, you can right-click the canvas to move the canvas on the page.

    After condition judgment is performed on a diagram element, you need to add a branch without selecting a condition name, that is, the default branch. Ensure that the IVR flow can find the next node when other conditions are not met.

  6. Configure information for each node and connection in sequence. The methods for configuring diagram elements of the same type are similar. Here, diagram elements of all types are described, as shown in the preceding figure. For other configurations, complete them based on Table 1.

    1. Configure a flow to ask whether to change the appointed date.

      Set Response Type to TTS, and select the template configured in Adding Resource Templates for Response Template.

      If Response Mode is set to Interruption recognition, the customer can speak before the voice playing ends, which saves the service time.

    2. Configure the Semantic Recognition node.

      The configuration indicates that the diagram element has a branch based on the returned result. That is, the branch whose intention code is finish is matched successfully, and the values of the slot variables doctor, date, time, and room in the matched intention are assigned to the flow variables docSlot, dateSlot, timeSlot, and roomSlot.

      If an intention template has multiple slots (for example, book time query node), you need to set Event to Clear Current Context Cache during semantic recognition setting. Besides, judgment control needs to be performed in the flow. For details, see How Do I Configure the Scenario Where Multiple Slots Are Filled Repeatedly?. In this example, for ease of understanding, the case of multiple rounds of slot filling is not considered.

    3. Click the connection line between the Semantic Recognition and Response diagram elements (the voice recognition matches the reply information configured in the intention response), and select the branch corresponding to the connection line as the branch configured in the previous step.

    4. Configure the Business Interface Invocation node.

      If the Business Interface Invocation diagram element is applied to the interface invocation scenario, you need to select an interface configured in Adding Business Interfaces. Set input parameters of the interface.

      In this scenario, real interfaces do not need to be invoked. The Business Interface Invocation diagram element is used to add cache variable names.

  7. After configuring the diagram elements, select correct lines and branches, and click in the upper part of the canvas.