I’m building a custom dashboard for our Mexico City team to track agent utilization metrics with high granularity. The goal is to pull tHandle, tAcw, and tHold broken down into 30-minute intervals rather than the default hourly buckets.
I’ve been hitting /api/v2/analytics/conversations/aggregates with a POST request, trying to force the aggregation using the interval parameter in the request body. Here’s the JSON payload I’m sending:
{
"dateFrom": "2023-10-27T00:00:00.000Z",
"dateTo": "2023-10-27T23:59:59.999Z",
"interval": "30min",
"groupings": ["user"],
"metrics": ["tHandle", "tAcw", "tHold"],
"filter": {
"type": "equals",
"path": "wrapup.code.id",
"value": "closed"
}
}
The API returns a 200 OK, but the response structure is weird. Instead of getting 48 rows per user (one for each 30-min slot), I’m getting a single row with the sum of the day. The interval field seems to be ignored or overridden by the backend logic.
I checked the Swagger docs and they mention interval supports 30min, 1h, 1d, etc., but nothing about why it would collapse into a daily total when 1d isn’t specified. Am I missing a required grouping field? Or is there a specific groupBy parameter I need to add to force the time-based segmentation?
I’ve tried adding time to the groupings array, but that just returns a 400 Bad Request saying time is not a valid grouping for this endpoint. The only groupings listed as valid are user, queue, routingSkill, etc.
Has anyone successfully queried sub-hourly metrics? I’m starting to think this endpoint doesn’t actually support sub-hourly aggregation despite the docs implying it does. If not, what’s the alternative? Do I have to poll the real-time API every 30 minutes and store it myself? That seems like a massive overhead for a simple report.