
Predicting Stock-Outs Using AI in Operations
Every operations team at a scaling D2C brand has experienced the same failure sequence. The stock runs out. The ops team discovers it when the OMS starts rejecting orders or the warehouse manager sends a message. The procurement team is notified. A reorder is placed. The supplier takes 10 to 14 days. In the interim, the product is either out of stock losing revenue and damaging customer experience or the brand scrambles to ship from a more expensive fulfilment point to patch the gap. The post-mortem invariably reveals that the signal was there weeks earlier. Sales velocity was trending up. The reorder calculation would have flagged the problem on day 7 or 8 of the trend. Nobody ran the calculation because nobody's job is to run that calculation manually for every SKU every day. The Operations AGI's stock-out prediction capability exists to make that calculation automatic, continuous, and complete covering every SKU, every warehouse location, and every channel at once, without requiring anyone to remember to look.
A stock-out is not a warehouse event. It is a revenue event that was created 14 to 21 days earlier when the reorder window closed unnoticed. The Operations AGI monitors live sell-through velocity by SKU, channel, and warehouse location and alerts 14 days before the stock-out date, not on it.
The Prediction Model Architecture
The Operations AGI connects directly to the WMS in real time not through a daily export or a weekly snapshot, but through a live query connection that returns current inventory counts as of the moment the query executes. Sell-through velocity is calculated at the most granular level available: individual SKU, by warehouse location, by sales channel. Velocity is computed across three rolling windows simultaneously 7-day, 14-day, and 30-day weighted by recency and adjusted for identified seasonality patterns in the SKU's historical data. The multi-window approach is essential for distinguishing genuine velocity increases (consistent across all three windows) from promotional spikes (elevated in the 7-day window but not in the 14 or 30-day), which would otherwise trigger premature reorder recommendations that inflate inventory.The stock-out date projection is calculated as: current inventory at location divided by weighted sell-through velocity equals days of cover remaining. When days of cover falls within the configurable alert threshold default 14 days the system generates a structured alert. The alert is triggered before the reorder needs to be placed, accounting for the SKU's configured supplier lead time. If a SKU's supplier lead time is 10 days and current days of cover is 14, the effective reorder window is 4 days. The alert fires at day 14 of cover so the procurement team has 4 days of decision time before the reorder window becomes urgent.
Three Velocity Adjustments That Prevent False Alerts
Raw units-sold-per-day is the starting point but not the full picture. The Operations AGI applies three adjustments that prevent the false alerts and missed predictions that make naive sell-through models unreliable in practice. The first is promotional de-inflation. If a SKU ran a sale event in the trailing 7-day window, the velocity figure is inflated by the promotional uplift and will overpredict forward demand at normal price. The Operations AGI detects active promotional periods from the connected OMS and marketing calendar and applies a de-inflation factor based on the SKU's historical promotional vs. organic velocity ratio. An alert triggered by a flash sale velocity spike that will normalise in 48 hours is noise. The promotional adjustment eliminates it.The second adjustment is seasonal pattern correction. The Operations AGI builds a SKU-level seasonality index from 12 to 24 months of historical data, identifying recurring demand patterns summer velocity increases for specific categories, pre-festival demand surges, post-clearance depressions. A winter clothing SKU showing 14 days of cover in October should be evaluated against the November velocity projection, not the October trailing average, because the forward demand is structurally higher than the current trailing average suggests. Without the seasonal correction, the system would trigger false positives in the weeks before seasonal demand peaks and false negatives in the weeks after.The third adjustment is supplier lead time reliability correction. If a supplier states a 10-day lead time but has historically delivered in 13 to 14 days across 8 of the last 12 orders, the effective lead time used in the decision window calculation is 13 days, not 10. The Operations AGI tracks actual vs. stated lead times for every supplier across every reorder and applies a lead time reliability factor. This prevents the common failure where procurement teams rely on stated lead times and consistently experience stock-outs despite placing reorders within the nominal window because the nominal window never reflected the supplier's actual performance.
What the Alert Contains
The stock-out alert is structured for immediate decision-making not a notification requiring further investigation. Each alert contains the SKU name and ID, the warehouse location, the current inventory count, the weighted velocity figure (with the adjustments applied), the projected stock-out date, the supplier lead time (actual, not stated), the effective decision window, the recommended reorder quantity, and whether a purchase order has already been raised for this SKU.The recommended reorder quantity is calculated using an Economic Order Quantity model parameterised with the SKU's historical demand variance, the carrying cost estimate, and the configured safety stock level for that product category. The alert also includes a 30-day demand forecast with confidence intervals allowing the procurement manager to evaluate whether the stock-out risk is driven by a temporary spike that may normalise, or by a sustained velocity increase that warrants a larger-than-standard reorder. A wide confidence interval on a marginal stock-out projection is a different risk profile than a narrow confidence interval, and the alert explicitly presents this distinction rather than collapsing it into a single headline recommendation.
Integration with Procurement Workflows
For suppliers integrated through API or EDI connections, the Operations AGI can initiate purchase orders autonomously when an alert is generated and the reorder quantity is within the procurement manager's pre-approved autonomy threshold. The PO is generated in the connected ERP, transmitted to the supplier, and logged in the operations dashboard. The procurement manager receives a confirmation with a 24-hour override window. For suppliers without direct integration, the Operations AGI generates a draft purchase order in the brand's standard format with all fields pre-populated SKU, quantity, unit cost, delivery address, requested delivery date ready for the procurement manager to review and send in under two minutes.Every reorder action whether autonomous or human-initiated is logged with the full decision chain: the velocity calculation, the projected stock-out date, the recommended quantity, the model confidence level, and the approval or override action taken. This audit trail allows the operations team to review and refine the model's accuracy over time, and provides the documented record of inventory decision-making required by organisations with procurement governance obligations.