I'm working with the following endpoint and wanted to find out how to get the number of Abandoned and Answered interactions.
While searching this forum I encountered the following logic for the Abandoned - On a conversation, look for a participant with "purpose": "acd" and a segment with "disconnectType":"peer".
Could you please advise the logic for Answered?
Also, was wondering would it be correct to count on tAnswered and tAbandoned metrics - Number of Answered = count(tAnswered); Number of Abandoned = count(tAbandoned) ?
You omitted the endpoint you are using but I am assuming it's a details endpoint based on context.
Unless you have a reason to try to rebuild a metric from scratch you should use the native metrics. The instructions you found were not about counting abandons, that was how to pull the raw detail of abandoned calls for deeper analysis.
If you just want metric aggregates the easiest way to obtain them is to use the Conversation Aggregates endpoint. to calculate the exact metrics you want grouped by the exact dimensions you want at the intervals you want.
Mining metrics from conversation detail is very painful and not worth it if you don't have a reason to be doing it that way.
what does it mean - "you should use the native metrics"
The instructions you found were not about counting abandons, that was how to pull the raw detail of abandoned calls for deeper analysis. - yes, but what stops me from counting on this?
Particularly:
On a conversation, look for a participant with "purpose": "acd" and a segment with "disconnectType":"peer"
then count +1
UI somehow knows this info, so I was interested in finding out how it's doing this -
a) checking the cases with "purpose": "acd" + "disconnectType":"peer"
b) if tAbandond exist
then count +1
The interaction UI shows a flattened version of that tree with all the elements displayed on a single row. If the user has a transfer Transfers is a Yes. If the user has an abandon metric its a Yes. The interaction UI is an activity log. It's not meant to count or summarize anything.
The Summaries in the Performance menu are aggregates. They use the conversation aggregation API to pull back counts and sums of the standard metrics grouped by whatever dimensions you ask for at whatever interval you ask for.
If you're looking for a count of abandons with or without other metrics its far faster and more efficient to do a simple call like this;
And get back every user and every queue already calculated at the daily level for each of the metrics than it would be to bring back thousands of rows of raw detail to try to calculate the metrics that are already available.
This:
On a conversation, look for a participant with "purpose": "acd" and a segment with "disconnectType":"peer"
was not instructions for how to count abandons. Do not do that if all you want to do is count abandons. That is how to create a report about who did abandons. Use the API designed for counting abandons to count abandons.