Is it possible to group by both queue.id and media.type in a single aggregation query? I’m trying to build a report that breaks down conversation counts by queue and then by media type (voice vs chat) for a specific date range. I’m using the Python SDK to construct the query.
Here’s the payload I’m sending to POST /api/v2/analytics/conversations/details/query:
{
"dateRange": {
"startDate": "2023-10-01T00:00:00.000Z",
"endDate": "2023-10-02T00:00:00.000Z"
},
"groupBy": ["queue.id", "media.type"],
"aggregations": [
{
"type": "count"
}
],
"select": ["queue.id", "media.type"]
}
The API returns a 200 OK, but the results array is always empty. If I remove media.type from the groupBy and select arrays, I get data for the queues. Same if I only group by media.type. But combining them yields nothing. I’ve checked the event logs and there are definitely conversations for those queues in that timeframe. Is this a known limitation with multi-dimensional grouping in the details query endpoint? Or is the syntax for the groupBy array different than I think?