Agent utilization query returning null for tAcw in 30-min intervals

Trying to pull agent utilization metrics broken down by 30-minute intervals using the Analytics API. The endpoint is /api/v2/analytics/details/queries.

I’ve got the query body set up to return tHandle, tAcw, and tHold. The tHandle and tHold values come back populated in the JSON response. tAcw stays null for every single interval. I’ve checked the agent’s wrap-up time in the UI and it’s definitely being logged.

Here’s the request payload I’m sending:

{
 "metrics": [
 "tHandle",
 "tAcw",
 "tHold"
 ],
 "intervalSize": "30m",
 "groupBy": "agent",
 "dateFrom": "2023-10-27T00:00:00.000Z",
 "dateTo": "2023-10-27T23:59:59.999Z"
}

The response comes back with a 200 OK. No errors in the logs. I’ve tried changing the intervalSize to 1h and the tAcw data appears then. It seems to be an issue specifically with the 30-minute granularity for ACW.

Is there a known limitation or a specific flag I need to set to get ACW data at this resolution? I’ve tried adding includeEmptyBuckets=true but that didn’t change anything.

The documentation for /api/v2/analytics/details/queries is a bit sparse on the exact conditions where tAcw populates, but from my experience with hybrid setups, it’s usually a data granularity or filter issue.

  • Check your date range. If you’re querying real-time or very recent data, the ACW metrics might not have flushed yet. The reporting API has a latency, especially if you’re in a region with high traffic. Try shifting your query window back by a few hours to see if historical data populates correctly.
  • Verify the grouping parameter. If you’re grouping by interval and the interval is too large, some metrics get aggregated or dropped. Ensure your interval is set to PT30M explicitly in the request body.
  • Look at the select clause. Sometimes, if you request too many metrics at once, the API drops the ones with lower data density. Try a minimal query with just tAcw to isolate the issue.

Here’s a minimal payload that works for me:

{
 "dateRange": {
 "startDate": "2023-10-01T00:00:00.000Z",
 "endDate": "2023-10-01T23:59:59.000Z"
 },
 "interval": "PT30M",
 "select": [
 "tAcw"
 ],
 "grouping": [
 "interval"
 ],
 "filters": {
 "type": "agent",
 "id": "your-agent-id-here"
 }
}

If tAcw is still null, check if the agent actually had post-call work in that timeframe. It’s easy to assume they did, but if they just ended the call without a wrap-up, the metric stays null. Also, ensure the user making the API call has analytics:query:view scope. It’s a silly thing to miss, but it happens.