Calculating Service Level percentage from raw interval groupBy data

We’ve been pulling raw conversation metrics through POST /api/v2/analytics/conversations/queries with groupBy: ["interval"] and a 15 minute slice. The response returns tAnswer and tHandle per bucket, but the dashboard needs a Service Level percentage for each interval. I’m trying to figure out the exact formula Genesys expects. Should I divide count(tAnswer < threshold) by the total count() for that bucket, or does the API already expose a weighted SL field I’m missing? The current calculation looks like this:

{
 "interval": "2024-05-20T08:00:00Z",
 "metrics": {
 "count": 450,
 "tAnswer": { "count": 380 },
 "abandoned": { "count": 25 }
 }
}

It’s returning values that drift 4-6% off the official Genesys UI report. The UI seems to apply some queue wait time weighting. Or maybe it’s just dropping the abandoned calls before the math runs. We’re hitting the 413 limit anyway if I push the query window past 7 days. Stuck on daily slices now. The metric definitions page just says percentage of conversations answered within threshold. Doesn’t explain how the weighting works on the abandoned calls.