Trying to build a custom dashboard that pulls raw interval data from /api/v2/analytics/interactions/summary. The goal is to calculate Service Level (SL) percentage manually because the pre-aggregated reports are too slow for our real-time needs.
We’re targeting a 20-second threshold. I’m fetching the data for the last 30 minutes using the interval parameter set to PT1M. The response gives me answered, abandoned, and waitTime buckets.
Here’s the logic I’ve implemented in Python:
sl_percent = 0
answered_in_sl = 0
total_answered = 0
for interval in response['granularTotal']['intervals']:
answered_in_sl += interval['metrics']['waitTime']['lessThan20s']['count']
total_answered += interval['metrics']['answered']['count']
if total_answered > 0:
sl_percent = (answered_in_sl / total_answered) * 100
The blem is the numbers don’t match the Genesys UI. The dashboard shows 82% SL, but my script calculates 76%. I’ve checked the timezones. We’re in Australia/Sydney (UTC+10). The API docs say the waitTime metric is calculated from the moment the interaction is queued until it is answered.
I’ve tried filtering by specific queue IDs and removing abandoned interactions from the denominator, but the gap remains. Is there a specific metric I’m missing? The waitTime object has lessThan10s, lessThan20s, etc. Am I supposed to use lessThan20s directly or is there a cumulative count somewhere?
Also, the waitTime count seems to include interactions that were abandoned after waiting more than 20 seconds but were eventually answered? No, that doesn’t make sense.
Can anyone point me to the exact formula Genesys uses for SL in the backend? The documentation just says “percentage of interactions answered within the threshold”. That’s not helpful when the math doesn’t add up. We’ve been debugging this for two days. Running the same query with different date ranges shows inconsistent variances. Sometimes it’s 1% off, sometimes 10%.
What am I doing wrong here?