SQL + Excel model that extracts batch-level expiry data from ERP, calculates days-to-expiry, applies three-tier risk classification (Critical / Warning / Monitor), and generates actionable disposal, markdown, and diversion recommendations per batch — surfacing alerts before write-off becomes unavoidable.
Batch expiry dates exist in the ERP/WMS but are never surfaced proactively. Stock nearing expiry is typically discovered during a periodic warehouse walk — by which point markdown or diversion windows have closed and write-off is the only option. The result: recurring quarterly write-offs that hit COGS with no early warning.
A scheduled SQL query extracts all batch records with shelf-life <90 days, computes Days-to-Expiry (DTE), and feeds into an Excel risk model that applies traffic-light tiering (Critical <30d, Warning 30–60d, Monitor 60–90d). Each batch receives a recommended action (Use Now / Markdown / Divert / Write-Off Plan) with estimated recovery value.
52 batches at risk across 6 categories. €92K in Critical tier (≤30 days, immediate action). €188K in Warning tier (actionable with markdown/diversion). Estimated recovery through proactive action: €267K of the €380K at risk — a 70% save rate. FEFO enforcement gaps in Dairy and Pharma categories are the primary root cause.
| BATCH ID | SKU | PRODUCT | CATEGORY | SITE | QTY (UNITS) | VALUE (€) | MFG DATE | EXPIRY DATE | DTE (DAYS) | RISK TIER | ACTION | RECOVERY (€) | WRITE-OFF RISK (€) |
|---|