Is it possible to create a trigger that invocates workflow only if the conversation was disconnected by customer in the inbound flow or in queue (before answering by agent)?
I tried to use the
v2.detail.events.conversation.{id}.customer.end topic with the following conditions:
disconnectType==ENDPOINT
direction==INBOUND,
but this trigger fires even if the call was answered by agent and only then disconnected by customer.
how about using v2.detail.events.conversation.{id}.acd.end with match criteria of direction INBOUND and acdOutcome ABANDON (reference below from the Event Schema)
Hi Zubair,
thank you for your answer,
I've checked the option to use two separate triggers - one for queue abandons with the topic that you suggested, and another for inbound flow abandons, but the triggers don't support the v2.detail.events.conversation.{id}.flow.end topic. So, in this case, I can't figure out how to catch customer disconnects in inbound flows.
Other option I can think of is to get the conversationId from the trigger v2.detail.events.conversation.{id}.customer.end then in your workflow use a data action to query /api/v2/analytics/conversations/{conversationId}/details and check if following metrics exist.
tAbandon (for the Queue participant i.e. purpose == acd)
tFlowDisconnect (for the Flow participant i.e. purpose == ivr)
The path for above would be something like x.participants[x].sessions[x].metrics[x].name in the query response.
You can then build the logic in your workflow whether to proceed further or do nothing.