Calculating Service Level % from /api/v2/analytics/details queue intervals

Hey everyone,

I’m trying to calculate Service Level percentages for our queues using the raw interval data from GET /api/v2/analytics/details. I’ve got the interval=5min set up and pulling data for the last hour. The response is 200 OK, which is good, but the math isn’t lining up with what I see in the Genesys Cloud dashboard.

Here’s the snippet of JSON I’m getting back for a single interval:

{
 "interval": "5min",
 "metrics": [
 {
 "id": "offerCount",
 "value": 150
 },
 {
 "id": "handledCount",
 "value": 142
 },
 {
 "id": "answerCountWithinTarget",
 "value": 120
 },
 {
 "id": "notAnsweredWithinTarget",
 "value": 22
 }
 ]
}

I was assuming SLA was just answerCountWithinTarget / offerCount. So for this block, that’s 120 / 150 = 80%. But the dashboard shows something closer to 84% for that same window.

Am I missing a metric in the payload? Should I be filtering out abandoned calls from the denominator? Or is there a specific way to handle the notAnsweredWithinTarget value in the calculation?

Any code examples for the correct formula would be great. I’m using Python with the requests library to fetch the data.