I’m trying to pull agent utilization metrics-specifically tHandle, tAcw, and tHold-broken down into 30-minute intervals. The goal is to feed this into a custom dashboard that shows real-time efficiency spikes.
I’ve been hitting the /api/v2/analytics/conversations/agents/details/query endpoint with a POST request. The documentation suggests using the interval parameter for time-bucketing, but I’m not seeing the granularity I need. When I set interval to PT30M, the response just aggregates everything into hourly buckets or returns a flat list without the time slices I expected.
Here’s the payload I’m sending:
{
"dateFrom": "2023-10-27T12:00:00.000Z",
"dateTo": "2023-10-27T13:00:00.000Z",
"interval": "PT30M",
"groupings": [
{
"type": "agent",
"id": "12345678-1234-1234-1234-123456789012"
}
],
"metrics": [
"tHandle",
"tAcw",
"tHold"
],
"paging": {
"pageSize": 100
}
}
The API returns a 200 OK, but the entities array contains a single object with summed totals for the hour, not two separate objects for the 12:00-12:30 and 12:30-13:00 slots. I’ve tried adjusting the dateFrom and dateTo to exactly 30-minute windows, but that feels like a workaround that would require dozens of API calls for a single day’s worth of data.
Is there a specific flag or different endpoint I’m missing? The conversations/details endpoint seems to handle intervals better, but it doesn’t expose the ACW and Hold time metrics in the same clean way. I need these specific metrics because they drive our performance scoring logic.
Also, I’m running this from a Node.js service using the official SDK. The analyticsApi.conversationsAgentsDetailsQuery() method seems to map directly to the REST endpoint, so the issue is likely in the query structure itself.
Any thoughts on how to force the API to respect the 30-minute interval for agent-specific metrics?