Service Level calculation logic on Analytics API intervals

Can anyone clarify the exact formula for Service Level using the raw interval data from GET /api/v2/analytics/conversations/counts? i’m summing offered and answeredWithinServiceLevel but the percentages don’t match the dashboard. rust 1.75 tokio 1.35

You need to check the denominator. the dashboard uses attempted calls, not just offered. missed calls count there too. try this quick python snippet to verify the math against the raw json response.

# ensure you're using attempted as the base
sl = (data['answeredWithinServiceLevel'] / data['attempted']) * 100 if data['attempted'] > 0 else 0

Warning: interval granularity matters. 15-min buckets often hide spikes that 1-min buckets show.