The problem
A simple stock alert only describes what is in the warehouse today. A production decision also has to account for open customer demand, confirmed incoming supply, seasonal consumption, lead time and the limited sales window of a batch.
The approach
I built a stock loop that projects free inventory and confirmed production against expected consumption up to the next feasible pickup date. It checks both a stock floor and a ceiling that prevents overproduction.
The loop distinguishes planned, requested, confirmed and delivered production. Only confirmed quantities count as future stock; an unanswered request cannot make a projected shortage disappear.
- Combine free stock, open demand and confirmed incoming supply
- Forecast consumption to the next realistic production date
- Check the stock floor, fixed MOQ and sales window together
- Calculate quantities, pickup date and batch numbers for the order
- Prepare a production-order draft for human approval
What this demonstrates
Stock planning needs two boundaries: protection from shortages and protection from overproduction. Optimising only the lower bound would turn the problem into expiry write-offs.
Where it applies
The pattern matters for companies that produce in fixed lots, work with long lead times or have to sell batches within a limited window. It connects operational data to a concrete but still controlled purchasing or production decision.
The implementation is tailored to a specific production model and is not a transferable standard package. Forecasts remain assumptions; short-term demand, supplier capacity and physical inventory can differ.