REF / AUTOMATION

Cape Town Retail Chain - AI-Driven Replenishment and Demand Forecasting

Built AI demand forecasting and automated store replenishment for a 24-store Cape Town retail chain - reduced stockouts 71% while cutting inventory holding.

RoleAutomation Lead
Year2025
Outcome−71% stockouts, −18% inventory holding
DomainAutomation
00
STACK

Tech used.

PythonProphetn8nShopifyPostgresPower BIClaude Sonnet 4.6

The Problem

A 24-store South African lifestyle retail chain was running replenishment the way most mid-sized retailers do. store managers placed weekly orders based on instinct, the central buying team consolidated, and the warehouse fulfilled. Stockouts on best-sellers were averaging 14% of SKU-store-days. At the same time, dead stock (slow movers stuck in stores 90+ days) was tying up roughly R12M in working capital across the network.

The COO's brief: smarter replenishment that cut both stockouts and holding cost simultaneously.

What I Built

1. Per-store, per-SKU demand forecast. A Prophet-based time-series model trained on each store + SKU combination (2 years of history) produces a 6-week rolling demand forecast. Adjusted for seasonality, local events, and the recent trajectory of similar SKUs.

2. Automated replenishment proposals. Every Monday, the system generates a proposed order per store: SKUs forecasted to stockout in the coming week, target service levels per category, supplier minimum-order constraints. Store managers review and confirm or adjust (managers retain final call. the system advises, never overrides).

3. Cross-store rebalancing. The system identifies cases where Store A has excess of an SKU that Store B is about to stock out on. Proposes inter-store transfers that beat ordering from supplier on lead time and cost.

4. AI-generated insights for category buyers. Weekly report by Claude flagging: SKUs trending unexpectedly up/down, regional patterns, suggested markdown timing for slow movers, new-launch performance vs forecast.

Weekly Replenishment Loopforecast → manager → truck
  1. 01
    TriggerPer-store, per-SKU forecast

    Prophet model trained on 2 years of history produces a 6-week rolling demand forecast adjusted for seasonality and local events.

  2. 02
    StepReplenishment proposal generated

    Every Monday: SKUs at stockout risk, target service levels, supplier minimum-order constraints. turned into a draft order per store.

  3. 03
    DecisionCross-store rebalancing checked

    Excess at Store A vs imminent stockout at Store B → inter-store transfer proposed when faster and cheaper than supplier.

  4. 04
    DecisionStore manager approves or adjusts

    Manager keeps final call. System advises, never overrides. Adjustments flow back as training signal.

    3h → 30m / week
  5. 05
    OutputOrder placed + buyer insights

    Final order goes to warehouse. Weekly Claude report flags trending SKUs, markdown timing, and launch performance for category buyers.

Stockout Rate (% of SKU-store-days)Mar 2024. Jun 2025 · automation phased in M5
Mar 24
14%
Jun 24
13%
Sep 24
12%
Dec 24
9%
Mar 25
6%
Jun 25
4%
−71%
Stockout rate
14% → 4%
−18%
Inventory holding
R12M → R9.8M
+12%
Same-store sales
vs prior year
8h
Buyer time saved/week
Operations Before vs After
MetricBeforeAfterΔ
Stockout rate (best-sellers)14%4%−71%
Dead-stock R-value (network)R12MR9.8M−18%
Same-store sales growth (YoY)+3%+12%+9 pts
Inter-store transfer % of replenishment0%11%new pattern
Manager weekly time on ordering3h30m−2.5h

Outcome

Same-store sales growth jumped 9 points YoY, primarily from being in stock when customers wanted to buy. Working capital tied up in dead stock dropped R2.2M. Store managers. initially sceptical of an algorithmic ordering system. became advocates after seeing it stocked their best-sellers more reliably than they had been managing manually. Two managers asked if the system could be extended to suggest visual merchandising priorities (it now does).