We’re trying to build a custom dashboard that shows real-time SLA compliance for our hybrid environment. The built-in Genesys reports are too slow for our ops team, so I’m hitting the Analytics API directly using the C# SDK.
I’m pulling data from /api/v2/analytics/queue/summary/intervals with a 5-minute interval. The goal is to calculate the percentage of conversations answered within 20 seconds. My logic seems sound based on the docs, but the numbers don’t match the UI at all. I’m getting 45% compliance in my code, but the dashboard shows 78%.
Here’s the snippet I’m using to cess the response:
foreach (var interval in response.Intervals)
{
var answeredWithinSLA = interval.AbcAbandoned + interval.AbcAnsweredIn20Seconds;
var totalAbandonments = interval.AbcAbandoned + interval.AbcExpired;
// Avoid div by zero
if (answeredWithinSLA + totalAbandonments > 0)
{
double slp = ((double)answeredWithinSLA / (answeredWithinSLA + totalAbandonments)) * 100;
Console.WriteLine($"Interval {interval.StartTime}: {slp}%");
}
}
I’ve checked the timezone handling. I’m sending startTime and endTime in UTC, and my server is in Sydney, but the API returns ISO strings which I parse correctly. I also tried adding groupby: mediaType to ensure I’m not mixing voice and digital, but the gap remains.
Is there a specific field I’m missing? I noticed abandoned vs expired in the docs, but I’m summing them as total offered. Maybe the definition of “answered” differs between the API and the UI? I’ve spent two days staring at this JSON payload and I’m going cross-eyed. Nothing else makes sense.