How to Analyze Inventory Stockouts with AI Without Guessing

How to Analyze Inventory Stockouts with AI Without Guessing

Olivia Park
September 6, 2026· 10 min read

To analyze inventory stockouts with AI, reconstruct availability by SKU, location, and time; identify stockout intervals; then compare patterns without labeling their cause. Sales observed while stock is unavailable may be only a censored lower bound on demand, so every explanation must remain a hypothesis until a distinguishing check supplies evidence.

Apply the responsible AI workflow: preserve lineage, constrain transformations, and keep operational decisions with inventory owners.

Key Takeaways

  • Define SKU, location, channel, and time grain before calculating events.
  • Reconstruct on-hand and availability from movements, not sales alone.
  • Zero sales can mean zero demand, unavailable stock, closure, or missing data.
  • Treat lost demand and substitution as unobserved unless evidence measures them.
  • Make candidate explanations mutually distinguishable with explicit tests.
  • Let an accountable owner decide replenishment or process changes.

What are inventory stockout patterns?

A stockout pattern is a repeatable description of when and where an item was unavailable, how long the interval lasted, and what observable conditions accompanied it. It is not a cause. “Stockouts cluster before weekend receipts” is a pattern; “the supplier is unreliable” is a causal claim requiring separate evidence.

Inventory research treats demand during stockouts as censored because observed sales cannot reveal all purchases that would have occurred with stock available.[1] Work on discrete-item inventory likewise addresses learning when demand is unknown and censored.[2] This distinction prevents a familiar mistake: interpreting low sales during an outage as low customer interest.

Use a row schema that preserves observations and interpretations separately:

FieldPurpose
SKU/location/time grainExact analytical unit
Opening/closing on-handReconciled inventory state
Receipts/transfersInbound and inter-location movements
Sales/cancellationsFulfilled demand and reversed transactions
Stockout intervalStart, end, and detection rule
Availability flagSellable, unavailable, unknown, or data gap
Lead timeObserved order-to-usable-receipt interval
Reorder parametersVersioned settings effective at the time
Promotion/calendar contextVerified events, not assumed causes
Data-quality flagMissing, duplicate, delayed, or conflicting input
Censoring statusWhether observed sales may understate demand
Hypothesis/checkCandidate explanation and distinguishing test
Owner/evidenceDecision authority and linked result

A censored demand analysis workflow for inventory stockouts

Step 1: Freeze grain, lineage, and definitions

Choose one SKU identity, location identity, channel, and time grain. Record timezone, business calendar, snapshot ID, source tables, extraction query or report, filters, status mappings, and owners. If a SKU was replaced, bundled, relabeled, or moved between locations, preserve the mapping and effective dates.

Define “stockout” operationally. It might mean on-hand equals zero, available-to-promise equals zero, ordering is disabled, or a customer-facing channel reports unavailable. These states are not interchangeable.

Keep an immutable raw extract and a transformation log. Use spreadsheet analysis controls for types, keys, and formulas, but do not let a cleaned table erase conflicting source values.

Step 2: Reconstruct the sellable inventory timeline

Start with a verified opening balance. Apply receipts, sales, returns, transfers, adjustments, reservations, releases, damage, quarantine, and cancellations in event order. State whether events use order, shipment, receipt, posting, or effective time.

Reconcile the computed closing balance with an independent snapshot. Differences enter an exception queue with amount, first observed time, affected interval, and owner. Do not force a negative balance to zero without preserving the discrepancy.

Availability can differ from physical on-hand. Units may be reserved, quarantined, unlisted, inaccessible, or assigned to another channel. Store both fields and the rule that converts state into sellable availability.

Step 3: Distinguish zero sales from unavailable stock

Create a status for every time bucket: available with sales, available with zero sales, unavailable, partially available, closed, or unknown. A missing feed is not a stockout. A store closure is not evidence of customer demand.

During an unavailable interval, observed sales are not full demand. They may be zero even though customers attempted to buy, switched products, switched locations, delayed purchase, or left. Research on stockout-based switching shows that substitution behavior affects fill-rate interpretation.[3] Do not manufacture lost-sales counts from category averages unless an approved analytical method and evidence support that estimate.

Step 4: Detect and review inventory stockouts

Define deterministic event logic. For example, an event starts when the approved availability signal enters unavailable and ends when usable stock returns and the channel can sell it. Specify how short gaps, delayed updates, partial availability, and overnight closures behave.

For every event, calculate start, end, duration, opening context, last sale, next receipt, demand censoring, and data-quality state. Keep the source event IDs so an analyst can replay the result.

Sample events manually. Compare source movements, channel status, and physical or cycle-count evidence where available. AI may format an event narrative from verified fields, but it cannot certify the event.

Step 5: Group inventory stockouts without declaring causes

Aggregate only after events pass validation. Useful cuts include SKU, location, day or hour, supplier route, lead-time band, reorder-policy version, promotion, category, and event duration. Show counts and denominators: “12 of 80 SKU-location weeks” is more informative than “frequent.”

Separate exposure from outcome. A busy location naturally has more opportunities for stockouts and sales. Compare rates per observed period, per replenishment cycle, or another defensible denominator, and preserve low-volume uncertainty.

Do not use supplier names, weekdays, or seasonal labels as causal shortcuts. A cluster does not prove a cause; it is a question generator. It may reflect demand, replenishment, transfers, parameters, data latency, assortment decisions, or multiple interacting factors.

Step 6: Generate mutually distinguishable hypotheses

Ask AI to propose explanations only from an approved hypothesis taxonomy, then require a test that would distinguish each one:

HypothesisDistinguishing evidence
Demand exceeded the approved forecastCompare uncensored periods, orders, searches, or reservations under an approved method
Receipt arrived later than plannedCompare purchase order, shipment, receiving, and usable timestamps
Reorder parameter was staleRecalculate using the effective parameter version and known inputs
Inventory record was inaccurateCompare event ledger with cycle count or physical evidence
Stock existed but was not sellableInspect reservation, quarantine, listing, and channel state
Transfer created local shortageTrace source and destination movement timing and approvals
Promotion changed demandCompare planned exposure and suitable controls; keep confounders visible

Use wording such as consistent with, contradicted by, or unresolved. Never convert association into a cause because a model produces a fluent explanation.

Using only the supplied event table, list observable patterns.
For each pattern, return mutually distinguishable hypotheses and required checks.
Do not estimate censored demand, assign blame, infer supplier performance,
or state a cause. Preserve unknown and conflicting values exactly.

Step 7: Execute checks and preserve counterevidence

Assign each check an owner, dataset, method, expected discriminator, due date, result, and evidence link. Seek evidence that could reject a favored hypothesis, not only evidence that supports it.

Use a data-validation checklist before interpreting timing. Late event ingestion can make receipts appear late or balances appear negative. Reconcile source totals and row counts with controlled spreadsheet matching.

If two hypotheses remain plausible, retain both. The correct outcome may be “insufficient evidence.” That is better than funding the wrong intervention.

Step 8: Let the inventory owner decide action

Present events, denominators, patterns, verified checks, counterevidence, uncertainty, and affected controls. The inventory owner decides whether to change reorder parameters, supplier processes, allocations, safety stock, monitoring, or data pipelines.

Use the root-cause analysis workflow only when evidence can connect a mechanism to the event. A stockout dashboard is not a completed root-cause analysis.

Record decision, approver, effective date, expected signal, guardrail, rollback condition, and review date. Test changes on a bounded scope where feasible and monitor both availability and unintended effects such as excess inventory or transfers.

Step 9: Maintain a repeatable review of inventory stockouts

Version definitions, mappings, availability logic, event rules, parameters, and hypothesis taxonomy. Re-run when source corrections arrive, assortment changes, a new channel launches, or ordering rules change.

Track forecast error and event-detection error separately. Monitor the share of intervals marked unknown and the proportion of events with unresolved data-quality flags. Improving the explanation model while the event data remain unreliable will not improve decisions.

NIST AI RMF frames risk work through Govern, Map, Measure, and Manage.[4] Apply those functions by assigning decision owners, mapping the operational context, measuring event and inference errors, and managing unresolved hypotheses without converting them into facts.

Keep historical results tied to the inputs and rules that produced them. Do not rewrite prior patterns after changing SKU mappings or event thresholds.

How should you review stockout cause hypotheses?

  • SKU, location, channel, time grain, and timezone are frozen.
  • Inventory movements reconcile opening and closing on-hand.
  • Sellable availability remains separate from physical stock.
  • Zero sales, closure, missing data, and stockout are distinct.
  • Censored demand is not replaced by an invented estimate.
  • Events are reproducible from source IDs and rules.
  • Pattern rates include defensible denominators.
  • Hypotheses include distinguishing checks and counterevidence.
  • Causes remain unresolved until evidence supports them.
  • Actions have accountable approval, monitoring, and rollback criteria.

Summary

  • Reconstruct availability before measuring stockout patterns.
  • Preserve lineage, data-quality exceptions, and censored-demand status.
  • Group verified events with appropriate denominators.
  • Turn patterns into hypotheses, not causal claims.
  • Run distinguishing checks and retain counterevidence.
  • Give the inventory owner the final operational decision.

Frequently asked questions

Is zero sales proof of a stockout?

No. Zero sales can occur with no demand, a closure, a channel problem, missing data, or unavailable stock. Use an approved availability signal and the inventory timeline.

Can sales data reveal demand during a stockout?

Usually not by itself. Fulfilled sales can be a lower bound because attempted purchases, substitutions, delays, and abandonment may be unobserved.

Should AI estimate lost sales?

Only an approved analytical method with suitable evidence should estimate censored demand. AI must not invent a number from surrounding periods or category averages.

How should substitutions be handled?

Track observed switches only when customer, basket, or channel evidence supports them and privacy rules permit the analysis. Do not assume that another SKU's increase equals substitution.

What time grain should we use?

Use the finest reliable grain needed for the operational decision. A daily table may hide a two-hour outage, while minute-level data can add noise if inventory events post late.

Can a promotion be labeled the cause?

Not from timing alone. Verify exposure, compare suitable control periods or groups, and consider stock, pricing, assortment, and calendar changes before making a causal claim.

What if inventory balances become negative?

Preserve the negative result as a reconciliation exception. Investigate timing, missing receipts, duplicate sales, units, mappings, and adjustment rules rather than forcing the value to zero.

When should action be approved?

After the owner reviews validated events, hypotheses, distinguishing evidence, uncertainty, cost, and unintended effects. Start with a bounded, monitored change where possible.

Disclaimer: This article provides general inventory-analysis information, not accounting, financial, supply-chain, or other professional advice. Validate data and methods with accountable inventory and analytics owners before changing operations.

Sources

  1. INFORMS, A Censored-Data Multiperiod Inventory Problem with Newsvendor Demand Distributions — https://pubsonline.informs.org/doi/10.1287/msom.1110.0340
  2. Production and Operations Management, Discrete-item inventory control involving unknown censored demand and convex inventory costs — https://doi.org/10.1111/poms.13824
  3. Journal of Business Logistics, The impact of stockout-based switching on fill rates — https://doi.org/10.1111/jbl.12359
  4. NIST, AI Risk Management Framework — https://www.nist.gov/itl/ai-risk-management-framework

Sources checked 6 September 2026.

Related articles

Start your 3-day free trial

Sign up to experience all premium features at no cost.

*Available only to new users. Each user is limited to one trial.

How to Analyze Inventory Stockouts with AI Without Guessing | AethoVPN