Need Correct Payload to Retrieve Total Talk for Inbound Callback Interactions

We are trying to extract total talk values from inbound callback interactions for the specified queues within the given date range by using the below API and payload. But it is giving wrong results(giving data for all the other mediatypes like voice and for outbound calls as well). Please provide correct payload to get the total talk value for inbound calls for callback media type.

API --> https://api.mypurecloud.ie/api/v2/analytics/conversations/details/query

payload -->
{
"interval": "2025-01-01T05:00:00.000Z/2025-02-01T05:00:00.000Z",
"segmentFilters": [
{
"type": "or",
"predicates": [
{
"dimension": "mediaType",
"value": "callback"
}
]
},
{
"type": "or",
"predicates": [
{
"dimension": "direction",
"value": "inbound"
}
]
},
{
"type": "or",
"predicates": [
{
"dimension": "queueId",
"value": "queue1"
},
{
"dimension": "queueId",
"value": "queue2"
},
{
"dimension": "queueId",
"value": "queue3"
},
{
"dimension": "queueId",
"value": "queue4"
},
{
"dimension": "queueId",
"value": "queue5"
}
]
}
],
"conversationFilters": [],
"evaluationFilters": [],
"surveyFilters": []
}
Could you please help me resolve this issue? Thank you.

You have fundamentally misunderstood the working of the Detail Query endpoints, nothing will make them behave how you're expecting.

They do not let you ask for specific subsections of conversations.
They let you ask for entire conversations based on them having specific criteria.

If you're more familiar with SQL that endpoint essentially does;

select * from conversations where conversationid in (select conversationid from conversations where {filter})

If you want to use that endpoint to get your answer you'd still have to manually filter the end results to just the pieces you care about and do a lot of extra computational logic.

To get tailored and targeted metrics you should get use Aggregate endpoints.

POST /api/v2/analytics/conversations/aggregates/query

https://developer.genesys.cloud/analyticsdatamanagement/analytics/aggregate/conversation-query

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.