Hi,
I have used Analytics API: /api/v2/analytics/conversations/aggregates/query
and specified the desired metric, in this case tAnswered -
Defining ASA as the amount of time an interaction waited to be connected to an agent the calculation would be tAnswered sum / count -
The result would be in milliseconds.
You can build the JSON body request to specifify the criteria, following example I requested last 30 minutes period information, and set the granularity to match the interval. I also requested the metric for one single queue and I was only inerested in the voice interactions. but I think yo can remove the predicate or changed it according to your needs.
You can review the notes and parameters definitions when building your own JSON body.
{
"interval": "2024-04-08T16:00:00/2024-04-08T16:30:00",
"timeZone": "UTC",
"granularity": "PT30M",
"groupBy": [
"queueId",
"mediaType"
],
"metrics": [
"tAnswered"
],
"filter": {
"type": "and",
"predicates": [
{
"type": "dimension",
"dimension": "queueId",
"operator": "matches",
"value": "940312cb-b4c2-4adb-8c85-904ac24d9ced"
},
{
"type": "dimension",
"dimension": "mediaType",
"operator": "matches",
"value": "voice"
}
]
}
}
-----Sample output ----
"metrics": [
{
"metric": "tAnswered",
"stats": {
"max": 64717,
"min": 259,
"count": 75,
"sum": 398841
}
Hope this helps
------------------------------
Camilo Montes
i3Vision Technologies Inc.
------------------------------