Genesys Cloud Analytics API: tHandle/tAcw/tHold in 30-min intervals for agent utilization

Hey folks,

I’m trying to pull agent utilization metrics (specifically tHandle, tAcw, and tHold) broken down by 30-minute intervals using the Genesys Cloud Analytics API. I’ve got a script in Python using the genesys-cloud SDK that works fine for summary data, but when I try to switch to interval queries, the response is missing the specific time-based breakdown I need.

I’m looking for an endpoint that supports interval-based queries for agent status metrics. The documentation mentions POST /api/v2/analytics/agents/status/query for retrieving agent status data, but it seems to be limited to the top 50 agents matching the query filters and doesn’t appear to support the granular 30-minute interval breakdowns I need for tHandle, tAcw, and tHold.

The payload I’m trying to construct looks like this:

payload = {
 "queryType": "interval",
 "interval": "PT30M",
 "dateFrom": "2023-10-01T00:00:00.000Z",
 "dateTo": "2023-10-01T23:59:59.999Z",
 "groupings": ["agentId"],
 "metrics": ["tHandle", "tAcw", "tHold"]
}

When I try to use the available status query endpoint, the JSON response only gives me aggregate totals for the day, not the 30-minute buckets. I’ve checked the documentation, and it seems like I should be getting an array of buckets with timestamps. Am I missing a parameter? Maybe groupBy or something in the queryType?

Also, I noticed that if I remove agentId from groupings, I get interval data, but it’s for the whole queue. I need it per agent. Any ideas?

1 Like