Skip to content

Case study · Retail

Forecasts at SKU and store level, every week

Retail replenishment is only as good as the forecast behind it. This is how we built machine learning forecasts at SKU and store level that account for seasonality, promotions and prices, and feed them into replenishment with accuracy tracked against the current method.

Project overview

Machine learning forecasting for replenishment.

Industry
Retail
Client
Confidential
Solution
Demand forecasting
Platform
Azure ML + Fabric
Timeline
10–16 weeks
Team
3 people
Granularity
SKU × store × week
Drivers
Seasonality, promotions, price
Output
Replenishment system

Expected business outcomes

What the client set out to achieve

Every model is backtested against the current forecast before it replaces it.

  • 10–30% Lower forecast error

    Compared with the current method on the same historical periods.

    Target range from backtesting; varies by category

  • 5–15% Less excess stock

    Better forecasts reduce the buffer needed for the same availability.

    Target range after replenishment uses the forecast

  • Weekly Automatic retraining

    Models retrain on new sales and are monitored for drift.

    With alerts when accuracy drops

Business challenges

Where the client started

Forecasts are averages with manual adjustments.

Method

Moving averages or last year plus a percentage.

Promotions

Uplift estimated by buyers from memory.

Stores

Forecasts at chain level, split to stores by a fixed ratio.

Stock

Overstock in some stores, gaps in others.

Trust

Buyers override forecasts because they don't trust them.

Proposed solution

What the ML build covers

Honest backtesting is as important as the model.

  • Feature pipeline

    Sales, prices, promotions, calendar and stock-outs prepared weekly.

  • Forecast models

    Gradient-boosted models across SKU-store series, with hierarchies.

  • Backtesting

    Rolling backtests against the current method by category.

  • Integration

    Forecasts delivered to the replenishment or ERP system.

  • Explainability

    Drivers shown per forecast so buyers understand changes.

  • Monitoring

    Accuracy tracked weekly with drift alerts.

Project requirements

What the client asked us for

The request was better forecasts. The proof is a backtest on the retailer's own history, category by category, before anything changes in replenishment.

Stock-outs are corrected in the training data, otherwise the model learns that demand is low when stock was simply missing.

What the project had to deliver

  • 01SKU-store forecasts
  • 02Promotions and prices included
  • 03Proven by backtesting
  • 04Explainable to buyers

Key challenges & considerations

What made it harder, and what we did

  1. Stock-outs hiding true demand

    What we did

    Sales history was corrected for stock-outs before training, so the model learned demand rather than availability.

  2. Short history for new products

    What we did

    New products borrowed the patterns of similar items.

  3. Promotion data recorded inconsistently

    What we did

    Promotion history was cleaned and tagged with buyers.

  4. Replenishment systems that accept limited input

    What we did

    Forecasts were delivered in the format the replenishment system accepted.

What we watched for

  • Correct for stock-outs
  • Always compare with the current method
  • Roll out by category
  • Explain forecasts to buyers

Development process

Backtest before you trust

Models earn their place category by category.

  1. Stage 1

    Data review

    Sales, promotions, prices and stock-outs assessed.

  2. Stage 2

    Baseline

    Current method measured as the baseline.

  3. Stage 3

    Models

    Models built and backtested by category.

  4. Stage 4

    Pilot

    Forecasts used for replenishment in pilot categories.

  5. Stage 5

    Scale

    Rolled out where it beats the baseline, with monitoring.

Technology stack

Practical machine learning on Azure

Proven forecasting methods, not experiments.

Machine learning

  • Python
  • scikit-learn / LightGBM
  • Azure Machine Learning

Data

  • Microsoft Fabric or Azure SQL
  • Feature pipelines

Serving

  • Batch scoring
  • REST API
  • ERP/CRM integration

Monitoring

  • Accuracy tracking
  • Drift alerts
  • Retraining schedule

Quality assurance & deployment

Measured against a test set before launch

AI quality was measured, not judged from a demo. A test set of real examples with agreed answers decided whether the system was ready, and the same set was re-run after every change.

  • A test set of real examples with agreed answers
  • Accuracy thresholds agreed with the business before launch
  • Safety checks: refusals, permissions and prompt-injection tests
  • A person reviewing low-confidence output
  • Cost and response time measured at real volumes

Deployment

  • 01PilotForecasts used for replenishment in pilot categories.
  • 02ScaleRolled out where it beats the baseline, with monitoring.
  • 03Pilot, then staged rolloutA small group of real users first, with results reviewed weekly before widening access.
  • 04Monitoring and warrantyAccuracy, drift, usage and cost tracked after launch, and six months of free bug fixing.

Final deliverables

Forecasts buyers can rely on

Replenishment runs on weekly SKU-store forecasts that account for promotions and seasonality, in the categories where they proved better.

Buyers can see why a forecast changed, so overrides become the exception.

  • Weekly SKU-store forecasts
  • Backtested accuracy
  • Explained drivers
  • Monitored for drift

Handed over to the client

  • 01Production AI serviceDeployed in the client's own cloud tenant
  • 02Source code and modelsIn a repository the client can access
  • 03Test set and resultsThe evidence behind the launch decision
  • 04MonitoringAccuracy, usage and cost
  • 05Six-month warrantyFree bug fixing after delivery

Success metrics

How success is measured

MeasureOutcomeHow it is measured
Lower forecast error 10–30% Target range from backtesting; varies by category
Less excess stock 5–15% Target range after replenishment uses the forecast
Automatic retraining Weekly With alerts when accuracy drops

Verified reviews

What clients say about our custom software work

Verified reviews from our clients on the same kind of work, published on Clutch.

5.0 27 verified reviews

Free discovery call

Have an idea? Let's turn it into AI-powered software.

Book a free discovery call with our experts. Share your idea and we will help you shape the scope, timeline and budget, under NDA.

  • Free consultation
  • NDA before we talk
  • Transparent estimate