Help Center/ Cognitive Engagement Center/ User Guide/ Tenant Administrator Guide/ Configuring Intelligent IVR/ FAQs/ How Do I Transfer the Disconnection Reason Code to the Specified Business Interface?
Updated on 2023-09-20 GMT+08:00

How Do I Transfer the Disconnection Reason Code to the Specified Business Interface?

When a call is disconnected, a specified interface may be required to report the disconnection reason code. To implement this function, you need to define the specified interface on the Business Interface page, create an exception flow, and record the disconnection reason code in the flow using a global variable.

Clarify the types of call disconnection reasons. From the perspective of participants, the reasons can be classified into the following types:

  • 1. A subscriber hangs up the call. In this case, the reason code is 2.
  • 2. The call is disconnected when the flow ends normally. In this case, the reason code is 0.
  • 3. The call is disconnected when the flow ends abnormally. In this case, the reason code is 1.

This section describes how to configure the flow, variable, and interface to report the three types of disconnection reason codes to the specified interface.

  1. Define a global variable to identify the disconnection reason.

    When adding a global variable, specify the default value, which must be the reason code for the call disconnected by the subscriber. For example, set the global variable name, data type, and default value to release_type, Character, and 2, respectively, as shown in the following figure.

  2. Add an exception flow and set the reason code for abnormal disconnection.

    Create a flow by referring to Adding Flows and set Scenario Type to Exception Flow. Generally, a Response diagram element is required in an exception flow to play etiquette expressions about causing the inconvenience, for example, "Sorry, we are facing some technical issues. Please try after some time. Thank you."

    Use the Business Interface Invoke diagram element to assign a value to the global variable, indicating the reason code of abnormal disconnection in the flow. In this example, set the global variable to 1. Use the Call ending diagram element to end the call in an exception flow.

  3. Set the reason code of normal disconnection in front of the Call ending diagram element in a normal flow.

    You do not need to change the logic of the current normal flow. You only need to add a Business Interface Invoke diagram element in front of the Call ending diagram element in a normal flow and assign a value to the global variable, indicating the reason code of normal disconnection in the flow. In this example, set the global variable to 0. The following is an example.

  4. Set the parameters for the specified interface.

    Add a business interface based on the interface information provided by the business side by referring to section 4.1.1. However, set the preceding variable that indicates the disconnection reason code to the input parameter of the message body in the interface, as shown in the following figure.

  5. Invoke the specified interface for the Call ending diagram element in the main flow.

    By referring to Call Ending, invoke the configured interface for the Call ending diagram element in the main flow to report different reason codes after a flow disconnects a call.