Blog · BL-18

Building Inventory Data into a Replenishment Product: From Stockout Alerts to Purchasing Workflows

Real-time inventory involves more than a single number. This article examines how SKU and variant mapping, locations and inventory states, sales and in-transit data, replenishment recommendations, exception handling, and purchasing workflows combine to form a functional product.

Triggering an alert when inventory falls below 10 looks like the simplest data product. Once it runs in production, teams immediately ask: Which warehouse, which variant, available or on hand, does committed order quantity count, when does in-transit arrive, how much to reorder, from which supplier, and has the recommendation been executed? A number only reduces stockouts and backlogs when it enters purchasing and transfer workflows.

A multi-platform inventory discussion on r/InventoryManagement (https://www.reddit.com/r/InventoryManagement/comments/1uq9l7k/how_do_you_all_keep_inventory_straight_across/) describes sellers managing multiple channels using memory and outdated spreadsheets, resulting in the same inventory being promised multiple times. Posts and replies reflect individual scenarios rather than proving that any specific software automatically solves the problem. The useful questions they raise are: Which system is the source of truth for inventory, how are channel identifiers mapped, and who gets notified when updates fail?

Define Inventory Objects Before Discussing Forecasting

Across channels, the same physical item may carry an internal SKU, a platform listing ID, a product ID, a variant ID, and a barcode. If colors, sizes, pack quantities, or kit relationships are mapped incorrectly, the system synchronizes incorrect numbers even faster. The first version should establish manually verifiable master product data before directly training sales models.

A minimal inventory key typically requires an inventory item, variant, location, and quantity state. Shopify's quantity and status management guide (https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps/manage-quantities-states) similarly divides ProductVariant, InventoryItem, InventoryLevel, and Location into distinct objects. Channel listings serve as sales entry points and should not automatically become internal product primary keys. Mapping tables must record who confirmed the data, when it took effect, whether relationships are one-to-many, and how unbundling, bundles, and substitutes are calculated.

Shopify's InventoryLevel resource (https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryLevel) expresses inventory as the quantity of an inventory item at a specific location, accessing states such as available, on hand, in transit, and committed through different quantity states. While this model does not represent all platforms, it illustrates that stating a SKU has 8 units is incomplete without location and state context.

Available, On-Hand, Committed, and In-Transit Cannot Be Combined Into Spot Inventory

Shopify's inventory application guide (https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps) distinguishes between states such as incoming, on_hand, available, committed, reserved, damaged, safety_stock, and quality_control. on_hand represents the total quantity at a physical location, but portions may be committed, reserved, damaged, or pending quality control, meaning they cannot all be used to accept new orders.

A replenishment product must display at least four business metrics: available to sell now, quantity committed to existing orders, physical quantity in stock, and in-transit quantity with expected availability times. If a platform provides only a subset of these, explicitly mark the coverage scope rather than attempting to derive a seemingly precise true inventory value through subtraction.

Safety stock is not a fixed number secretly subtracted from available quantities. The product should allow users to view safety stock rules, applicable locations, and effective timeframes. Promotional periods, supply fluctuations, or new product phases may require different buffers, and any automatic adjustments should retain reasons and operational audit logs.

Event Updates and Periodic Reconciliation Must Coexist

Orders, cancellations, refunds, receipts, transfers, and stock counts all modify inventory. Event-driven synchronization reduces latency but cannot replace periodic full reconciliation. Webhooks can be delayed, duplicated, out of order, or lost, and channels may only send events for a subset of states.

Official Shopify documentation notes that changes to states such as committed, reserved, damaged, safety_stock, and quality_control do not trigger corresponding inventory webhooks. Subscribing only to inventory_levels/update does not provide complete visibility into state changes. Products must design supplementary queries and reconciliation cycles based on the capabilities of each source.

Each inventory event should preserve source event ID, item mapping, location, state, change quantity, source timestamp, receipt timestamp, and processing result. Idempotency keys prevent duplicate deductions, version or time rules handle out-of-order execution, and periodic snapshots detect discrepancies between accumulated events and current source values.

Sync failures must route to an exception queue. When one channel updates successfully while another fails, the system must not report a global success. Internal API error and self-healing guides (https://everyinfra.com/build/api-errors-self-healing) help distinguish rate limits, timeouts, permission issues, invalid mappings, and source errors, mapping each to specific retry and manual handling procedures.

Upgrade Stockout Alerts to Explainable Replenishment Recommendations

Fixed thresholds suit highly stable, small-scale operations but fail to account for lead times, sales velocity changes, placed purchase orders, and minimum order quantities. An explainable replenishment recommendation states at minimum: the sales window used, current available and in-transit inventory, expected lead time, target days of cover, supplier constraints, and recommended quantity.

Do not hide formulas behind AI suggestions. Even when using forecasting models, users need to see key inputs and sensitivity metrics: how recommendations change if lead times shift from 7 days to 21 days, who can exclude promotional sales data that should not be extrapolated, and what initial assumptions apply to new products lacking historical data.

Replenishment candidates fall into three categories:

  • Process immediately: based on current available inventory, commitments, in-transit orders, and lead times, a stockout is projected before replenishment arrives.
  • Requires confirmation: sales or lead time data is insufficient, and the system lists missing fields and suggests a reviewer.
  • Do not replenish: inventory is sufficient, in-transit stock covers demand, or items are discontinued or undergoing clearance.

Do not replenish is not a permanent status. Recommendations must include generation timestamps, inventory versions used, and expiration conditions, recalculating when large orders, supply delays, or manual counts occur.

Purchasing Workflows Represent the Delivery Endpoint of Replenishment Products

After receiving alerts, procurement staff still need to select suppliers, confirm minimum order quantities and packaging, request budgets, create purchase orders, track shipments, and manage receiving and quality inspection. If a product only sends a low-inventory email, users still spend time reconciling identical information across multiple systems.

A purchase candidate card can include items, locations, estimated stockout dates, recommended quantities, open in-transit orders, suppliers and lead times, calculation bases, and exception items. Designated owners generate purchase tasks upon confirmation rather than placing orders automatically. Automated ordering creates financial and inventory risks and should be developed as a separate capability incorporating authorization, limits, and rollback designs.

Receiving goods does not mean everything is immediately available to sell. Quantity variances, damages, and quality inspection statuses must be written back, and partial purchase order deliveries must maintain pending balances. The ultimate closed loop is suggestion, approval, ordering, in-transit tracking, receiving, availability, and post-analysis, rather than a clicked notification.

Refer to internal unified data API design guides (https://everyinfra.com/build/unified-data-api-guide) for data objects and status interfaces. If monitoring external product prices simultaneously, separate replenishment decisions from price monitoring subscription products (https://everyinfra.com/blog/price-monitoring-subscription-product): price changes can influence purchasing judgments but cannot replace internal inventory and supply evidence.

Multi-Warehouse and Multi-Channel Setups Require Explicit Allocation Rules

Company-wide inventory availability does not guarantee fulfillment capacity at a specific location. Replenishment systems should first determine whether transfers outperform procurement: whether another warehouse holds transferable stock, what shipping times and costs are involved, and whether transferring stock causes new stockouts elsewhere. Transfer recommendations and purchase recommendations use different action items and approval chains.

Channel allocation similarly requires rules. Synchronizing total available quantities to every channel risks overselling, while fixing static allocations per channel can strand inventory. Shared pools, channel caps, or safety buffers can be configured, but products must display current strategies and recent sync statuses. Real-time operations still involve concurrent orders, network latency, and platform processing times, so zero overselling should not be promised.

For bundles and multi-packs, order events must be converted into underlying component consumption. For example, selling a single two-pack requires reducing base inventory by two units. If the same component participates in multiple bundles, replenishment recommendations must aggregate demand at the component level. When mapping is uncertain, blocking automatic synchronization and requesting confirmation is safer than propagating incorrect quantities.

Data Quality Dashboards Provide Value Earlier Than Complex Forecasting

Replenishment errors often stem from missing lead times, incorrect SKU mappings, delayed stock counts, unreplenished cancelled orders, or unupdated in-transit statuses rather than algorithms. Products should turn these gaps into work queues tracking items without suppliers, locations overdue for physical counts, failed event processing, and purchase orders past expected delivery dates.

Forecasts should also be compared against actual results: expected versus actual stockout dates, recommended versus approved quantities, and days to sell after delivery to check for backlogs. Manual overrides are not noise indicating model failure, but high-value feedback for understanding business constraints.

Coverage interruptions require dedicated tracking. If channel authorization expires, sudden drops in sales volume can cause models to misjudge falling demand. If inventory queries fail, systems may over-reorder. Data freshness and source health should be displayed alongside business metrics.

Begin the MVP with a Single Procurement Cycle

The initial version can cover a single channel, a single warehouse, and dozens of high-frequency SKUs. Complete item mapping, inventory states, event reconciliation, and purchase candidate cards first, then validate them through one full procurement cycle. Complex forecasting, multi-warehouse optimization, and automated ordering can follow later.

Acceptance metrics include available warning time before stockouts, sync exception discovery time, reasons for accepting or modifying recommendations, emergency purchase counts, stockout and backlog changes, and processing time from recommendation to order placement. Avoid measuring only notification volume or attributing all inventory improvements to the system without control groups.

This article discusses methodologies for productizing inventory data and does not imply that EveryInfra has released an inventory or purchasing management product. Inventory data generates value not when dashboards refresh, but when teams complete correct actions based on explainable recommendations while the system continues reconciling data after source changes, sync failures, and manual adjustments.