Hey all,
We’ve got around 1200 agents and I’m banging my head against a wall with analytics jobs. It’s not a straight 400 or 500 - it’s more… subtle. Jobs complete successfully, the API returns 200, but the data returned is consistently wrong when using a historical date range.
I’m using the
GET /api/v2/analytics/jobs/{jobId}/resultsendpoint to pull down the results. Specifically, thedateFromanddateToparameters seem to be ignored for certain metrics.
It’s happening across multiple metrics - call volume, average handle time, even simple things like number of agents logged in. If I narrow the dateTo to today only, the results are accurate. Extend it back even just a day, and it’s garbage. I’m testing with view=digital and view=voice and it’s affecting both.
The docs say the API supports date ranges up to 90 days. We’re well below that.
I’ve tested with different date formats too - YYYY-MM-DD, YYYY-MM-DDTHH:mm:ssZ - no difference. The Celery worker logs show the jobs are completing without error. Here’s a sample payload:
{
"view": "digital",
"dateFrom": "2024-02-01T00:00:00Z",
"dateTo": "2024-02-15T23:59:59Z",
"filters": [],
"metrics": [
"nlu.v1.total_messages",
"nlu.v1.messages_sent_by_agent"
]
}
I initially thought it was a caching issue on our PostgreSQL analytics instance but it’s persisting across multiple reboots.
Not 100% sure but I’m wondering if there’s something wonky with how the analytics engine handles historical data for jobs created via the API versus those run through the UI. Maybe a different process gets used. I’m on Python 3.9, using the official Genesys Cloud v4.1.3. It’s happening on both our dev and staging environments.
The weirdest part? Sometimes it looks right in the first few pages of results, then completely falls apart.