Implementing Anomaly Detection for WFM Forecast Variance

Hello. We are managing a multi-org environment and I want to improve our forecasting accuracy. Currently, our workforce planners manually compare the forecast to the actual call volume at the end of every week. I want to build an automated anomaly detection system that alerts us in real time if the actual volume deviates by more than twenty percent from the forecast. How can I pull both the forecast data and the real-time interaction metrics via the API to perform this comparison programmatically?

I handle our Salesforce integration and we do something similar for our sales team. You are looking for a lot of data! You need to hit the /api/v2/workforcemanagement/managementunits/{muId}/forecasts endpoint to get your baseline. Then, you use the Analytics Observation API to get the current ‘nOffered’ count for your queues.

The hard part is aligning the time intervals. The forecast is usually in fifteen-minute blocks, so your script has to aggregate the real-time counts to match.

It is a bit of a headache to code in Python but it is definitely possible.

That is right about the aggregation. I have automated this for our entire org. I use an AWS Lambda function that runs every fifteen minutes.

It pulls the latest forecast for the current interval, compares it to the analytics observation data, and sends an alert to our WFM group if the variance is too high. If you want to get really fancy, you can use Amazon Lookout for Metrics to find the anomalies automatically instead of just using a flat percentage.

It is much more accurate for seasonal trends!