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 customer hangs up the call. Assume that the reason code is 2.
- 2. The call is disconnected when the flow ends normally. Assume that the reason code is 0.
- 3. The call is disconnected when the flow ends abnormally. Assume that 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.
- 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 calls disconnected by customers. 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.
- 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 Robot Reply 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 Interface Invoking 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.
- 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 an Interface Invoking 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.
- 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.
- 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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot