Here is the raw JSON payload I’m getting from the POST /api/v2/analytics/conversations/queues/ranges endpoint for a specific 15-minute interval:
{
"interval": "2023-10-27T14:00:00.000Z/2023-10-27T14:15:00.000Z",
"metrics": {
"offerCount": 120,
"answerCount": 118,
"abandonCount": 2,
"serviceLevelCount": 95,
"serviceLevelPercent": 0.805
}
}
I am building a custom CLI tool in Python using the genesys-cloud SDK to audit our historical SLA compliance. The documentation states that serviceLevelPercent is the ratio of answered calls within the threshold to the total offered calls. However, when I manually calculate this based on the interval data, I get:
95 / 120 = 0.7916 (approx 79.16%)
But the API returns 0.805. This is a significant drift from my expected calculation.
I have verified that the threshold parameter in my request body is correctly set to 20 seconds, matching the queue configuration. I also checked if answerCount should be the denominator instead of offerCount, but 95 / 118 = 0.80508, which matches the API’s returned percentage almost exactly.
This implies the API might be calculating SL as answered_within_threshold / answered_total rather than answered_within_threshold / offered_total. If this is the case, it diverges from the standard Genesys Cloud definition used in the dashboard.
Is there a specific flag or metric variant I need to request to get the standard SL calculation? Or is this a known quirk in the interval-level data aggregation? I need to ensure my CLI reports align with the platform’s official metrics for our compliance audits. Any insight into the underlying formula for serviceLevelPercent in the Analytics API would be appreciated.