We are trying to pull real-time queue statistics directly into a script to check current wait times before routing a call. The goal is to use the v2 Reporting API via the REST Proxy action in .
Here is the setup. I’m calling:
GET /api/v2/analytics/queue/realtime
With query parameters:
- groupIds={queueId}
- dateFrom=2023-10-27T00:00:00Z
- dateTo=2023-10-27T23:59:59Z
The API returns a 200 OK. The JSON payload looks correct at first glance. It includes stats for abandonedCount, answeredCount, etc. But the lastUpdatedTime in the response is often 15 to 30 seconds behind the actual system clock.
Here is a of the response body I’m getting:
{
“stats”: [
{
“groupId”: “abc-123”,
“groupType”: “queue”,
“lastUpdatedTime”: “2023-10-27T10:45:12.000Z”,
“abandonedCount”: 5,
“answeredCount”: 120
}
]
}
If I check the CXone dashboard or use the Analytics API directly in Postman, the data seems fresher. Or maybe Postman is just faster. We’ve tried increasing the polling frequency in the script, but that doesn’t help if the API itself is serving cached data. Is there a specific parameter to force a fresh query? Or is this endpoint inherently laggy for real-time decisions? We need this to be accurate within a 5-second window for our routing logic. Currently, we are seeing calls routed to queues that are already full because the script read stale data.