For Voice Use-cases, it's important to understand the behaviour of the conversation is different to chat based conversations. Unlike most chat channels, there is a distinctive event that occurs when a conversation ends - the disconnection of the call!
This event can be triggered by either the bot or the user. If the bot disconnects the call, it is because the conversation reached a point in its design where the it was intentional for the call to end: e.g.
"I'm glad i could solve your problem today. Thanks for calling." <Call ends>.
However, on the contrary, the caller can end the call at any time during the conversation without warning. This means our flows need to be aware of when the event occurs as a best practise so we can track the event as part of the chatbot analytics and view it in the Cognigy Insights Step Explorer or record it as goal.
The event received when a caller disconnects the call is sent to the flow as a data message. The data format is the following:
This data is received by the flow under the input data object available in cognigyscript as:
The intent rule contains the following expression:
input.data.request.name == "disconnect"
By using the "helper flow" approach, your analytics data will be much tidier from the perspective that each time this intent is triggered you can end the call with the associated intent step and if necessary, perform a flow execution to overwrite odata analytics records with other conversation parameters.