Running into a weird issue with data freshness in our reporting script. We have a Python backend that polls for conversation stats every 5 minutes.
If I hit GET /api/v2/conversations, I get real-time data. The JSON payload includes the exact start time and current status. Perfect for live dashboards. But the rate limits are tight.
So I switched to GET /api/v2/analytics/conversations. The docs say this is for historical data. The problem is the delay. I see conversations ending at 10:05 AM, but the analytics endpoint doesn’t show them until 10:15 AM. That’s a 10-minute lag.
Here is the query I’m using:
GET /api/v2/analytics/conversations/summary?dateFrom=2023-10-27T10:00:00.000Z&dateTo=2023-10-27T10:10:00.000Z
The response comes back empty for that window. If I shift dateFrom to 10:00:00 and dateTo to 10:20:00, the data appears.
Is there a way to force the analytics engine to index faster? Or is this just how it works? We need near real-time stats without burning through our v2/conversations quota.
Tried adding different groupBy fields, no change. The latency seems fixed.
Any thoughts on how to bridge this gap? We can’t poll v2/conversations every second for 500 agents. It’s not scalable.