Hey guys, total stackoverflow style question here. I’m building a custom gamification leaderboard to reward our high-performing agents. I’m trying to pull ‘Agent Occupancy’ through the Platform API, but the numbers I’m getting back are all over the place. One minute an agent is at 95% occupancy, the next they’re at 200% (which makes no sense). The standard WFM dashboard shows them at a steady 88%. I’m using the v2.analytics.users.aggregates endpoint. Is there a specific metric ID or a calculation formula I’m missing to get the ‘Clean’ occupancy percentage that WFM uses?
I am so excited that you are building a custom leaderboard! Gamification is such a brilliant way to motivate the team at our 5000-agent BPO! The issue you’re seeing with the 200% occupancy is likely because you are counting ‘Multiple Interactions’ for the same agent simultaneously! In the WFM engine, occupancy is calculated as (Busy + Wrap) / (Available + Busy + Wrap). However, the raw analytics aggregates might count each messaging session as a separate ‘Busy’ segment. You have to ensure your query is ‘Interaction-Aware’ so you don’t double-count agents who are handling three chats at once! It’s all about the data normalization!
Hello. I use Terraform to manage our reporting infrastructure and I can tell you that the WFM engine uses a different data silo than the standard Analytics API. The WFM ‘Occupancy’ is a calculated virtual metric that is only available through the v2.workforcemanagement.managementunits.{muId}.realtimeadherence endpoint. If you try to calculate it yourself from raw user aggregates, you will always have drift because WFM accounts for ‘Secondary Presence’ and ‘System Off-Queue’ states that are not explicitly flagged in the standard analytics buckets. You should query the WFM RTA endpoint directly for your leaderboard data.