Updated on 2024-10-12 GMT+08:00

(Optional) Configuring an Inbound Call Flow

You can configure a flow to directly transfer an inbound call to the number of a customer manager who has provided services for the customer.

Prerequisites

  • You have completed the connection between the AICC and OIAP.
  • You have obtained the information about the mobile agent and bidirectional call interfaces in the API Fabric from the O&M personnel.

Context

The flow invokes the getCalledInfo interface to obtain the inbound call data, and transfers the inbound calls to a specified number or a skill queue based on the data.

Procedure

  1. Add a voice file, which is used as a voice prompt for an error flow.

    1. Sign in to the AICC as a tenant administrator and choose Configuration Center > Resource Management > Audio and Video.
    2. Click Language Setting, click Set As Default next to the language to be set as the default language, and click Save.

    3. Click New in the upper right corner. The page for adding a voice file is displayed.
    4. Set voice prompt parameters.
      • Resource Name: Enter the name of the file to be uploaded.
      • Usage Scenario: Select IVR.
      • Select Select a voice file, click , select a local WAV voice file, and click Submit. If you do not have a voice file, select Online Recording.
      Figure 1 Adding a voice file
    5. Click Submit to submit the voice file to the system administrator for approval.

  2. Add an error flow.

    A tenant space has only one error flow. The flow provides a solution for common errors in a normal flow (for example, the next node cannot be found).
    1. Choose Configuration Center > Chatbot Management > Flow Management.
    2. Click New.
    3. Set flow parameters. Enter a flow name, set Type to Exception Handling Flow, set Is Referenced to Yes, and click Save.
    4. Click the flow to expand it and click Edit. The flow editing page is displayed.
    5. Draw a flow, set the voice file added in 1 as the prompt tone for the Play Voice node, as shown in the following figure, and click Save to save the flow.

    6. Expand the new error flow, click Release, select Official Release, and click Confirm. The new flow is successfully published.

  3. Add the two interfaces to the trustlist.

    The two interfaces are used for authentication and obtaining interface data.
    1. Contact the system administrator to add the IP addresses and port numbers, or domain names of the interfaces to the trustlist of the interface control menu.
    2. Choose Configuration Center > Chatbot Management > Flow Configuration > Resource > Business Interface.
    3. Click the Self-defined Interface tab and click New. The Add Business Interface Configuration dialog box is displayed. Set interface parameters by referring to Figure 2 to Figure 5.

      Figure 2 and Figure 3 indicate the input and output parameters of the getCalledInfo interface. Figure 4 and Figure 5 indicate the input and output parameters of the token interface.

      The token interface is used to obtain the token for AICC authentication. The getCalledInfo interface is used to check whether the current calling number has historical call records. If historical call records are available, the called numbers are found.
      Figure 2 Message header and output parameters of the getCalledInfo interface

      Figure 3 Input parameters of the getCalledInfo interface
      Figure 4 Message header and output parameters of the token interface

      Figure 5 Input parameters of the token interface

  4. Add an inbound call flow.

    1. Choose Configuration Center > Chatbot Management > Flow Configuration > Flow > Orchestration.
    2. Click .
    3. Set flow parameters. Enter a flow name, set Type to Subflow, and click Save.
    4. Click the flow to expand it and click Edit. The flow editing page is displayed.
    5. Click a diagram element on the canvas and create the following flow variables on the right.

      These variables are used to store the data returned by the interface in the flow.

      Figure 6 Configuring parameters
    6. Drag diagram elements to the canvas and draw the flow as shown in the following figure.
      Figure 7 Drawing a flow
    7. Configure nodes.

      Node

      Configuration

      token

      Interface Invoking diagram element, which references the token interface added in 3.

      Message header:

      • Set Content-Type to application/json.
      • Set X-Token-Expire to 6000.

      Input parameters:

      • Set app_key to the AK.
      • Set app_secret to the SK.

      Output parameters:

      • Set AccessToken to FLOW.AccessToken.

      getCalledInfo

      Interface Invoking diagram element, which references the getCalledInfo interface added in 3.

      Message header:

      • Set x-app-key to the value of AK.
      • Set Authorization to Bearer ${FLOW.AccessToken}.
      • Set Content-Type to application/json.

      Input parameters:

      • Set caller to ${SYS.callingNumber}.
      • Set called to the system access code provided by the mobile agent.

      Output parameters:

      • Set retCode to FLOW.retCode.
      • Set result.devType to FLOW.devType.
      • Set result.called to FLOW.called.
      • Set result.skillId to FLOW.skillId.

      Branch Judgment (left)

      Branch Judgment diagram element, which is used to determine whether an interface is successfully invoked.

      If the value of FLOW.retCode is 0, the interface is successfully invoked.

      Branch Judgment (right)

      Branch Judgment diagram element, which is used to determine the flow direction.

      • If the value of FLOW.devType is 1, the call is transferred to the called number returned by the getCalledInfo interface.
      • If the value of FLOW.devType is 0, the call is transferred to the skill queue specified by the call center.
        NOTE:

        Note that the skill queue is a voice skill queue of common agents, but not mobile agents.

      Transferring number

      Call Transfer diagram element, which is used to transfer a call to a third-party number.

      Set Transfer Type to Third-party number and Route Value to ${FLOW.called}.

      Transferring to a skill queue

      Call Transfer diagram element, which is used to transfer a call to a skill queue.

      Set Transfer Type to Skill Queue(Name) and Route Value to an existing voice skill queue in the system.

    8. Click in the upper part of the canvas to save the flow.
    9. Expand the new subflow, click Release, select Official Release, and click Confirm.

  5. Set the called route and add the association between the flow and the system access code.

    1. Choose Configuration Center > Access Configuration > Called Party.
    2. Click New to add a called route.
    3. Click , select a system access code of the Audio/Video type, enter an extension code, set Device Type to IVR, and select the flow configured in 4.

    4. Click Save.