From forecast to order proposal.
Demand per product and location for the next four weeks, turned into an order list a buyer can approve or adjust.
Order proposal
Products
Dashed line is the forecast, shaded area the 80% range.
Order proposal
| Distribution centre | Forecast | Safety stock | In stock | On order | Proposal | Value | Status | Action |
|---|
Rule: proposal = max(0, forecast + safety stock - in stock - on order). Forecast is the sum over the chosen horizon, in cases. Safety stock is about half a week of expected demand. Value is cases times cost per case. Range is the 80% interval and widens with the horizon.
One dot per product and centre. Orange dots are outside a limit: error above 15%, or less than one week of cover.
How lines get flagged
- Forecast error above 15%: weighted absolute error over the last 8 weeks.
- Stock-out risk: stock plus open orders cover less than one week of forecast demand.
- Exposure is revenue at risk for a stock-out, plus four weeks of the recent forecast miss at cost.
Exposure by centre
Lines to look at
| Product | Centre | Issue | Detail | Exposure |
|---|
Accuracy = 100% minus the weighted absolute error of the weekly forecast, all products and centres. Orange cells in the heatmap are below 85%.
What changed
Scenario
Formula: forecast = base × (1 + promo uplift) × (1 + sensitivity × °C). Promoted items: Mozzarella, Oat drink, Olive oil. Sensitivity per °C: Strawberries +6%, Chicken thigh +2%, Potatoes -2%. Safety stock stays as it is.
Where the order changes
| Product | Base proposal | Scenario proposal | Change, cases | Change, € |
|---|
Prepare Monday order
The agent reads this week's forecast, the stock position and open purchase orders, applies the order rule, and explains the three largest changes against last week's proposal.
Proposal change vs last week
The agent reads
Changes come from three things: the forecast was revised, stock is different from what last week's plan assumed, and a scenario is active. The bars show the € effect at cost.
Sample data. Names and figures are made up for this demo.
What we built
- A weekly demand forecast per product and distribution centre, with a range, tracked in MLflow
- Forecasts stored as Delta tables in Unity Catalog, next to the sales metrics
- One written rule for the order proposal: forecast plus safety stock, minus stock and open orders
- A Databricks App where the buyer approves or adjusts each line
The order rule is written once, so the buyer, the planner and finance calculate a proposal the same way. A change to safety stock or lead time is a change to one definition, not to ten spreadsheets.
In this concept the numbers are generated in the page: a seasonal demand curve with random weekly noise, and a stock position per centre. In a live build the forecast table is written by the scheduled job, the app reads it, and approved lines go to the ERP as draft purchase orders.
How it is built
Sources
Orders, stock levels and open purchase orders from the ERP, plus supplier files.
Lakehouse
Bronze and silver tables loaded nightly. Daily demand per product and centre in gold.
Forecast
A scheduled job writes forecast and range per product, centre and week. Runs and errors are logged.
Buyer app
Shows the proposal next to stock and open orders. The buyer approves or changes each line.