Stock and availability
Stock and availability
Inventory entries connect a SKU to stock, optionally scoped to a supply channel. The store’s supply context determines which stock is relevant to its buying experience. Availability tells the storefront whether the variant can currently be purchased.
Choose an allocation policy
| Strategy | Use it when |
|---|---|
NONE | The entry should not impose tracked stock limits |
TRACK | You track quantities without Thor order allocation |
TRACK_AND_ALLOCATE | You track quantities and use order allocation |
For tracked and allocated stock, distinguish total quantity from quantityAllocated.
Ten recorded units with four allocated units leave six unallocated units for that entry.
Do not interpret a physical count as an additional quantity to add to existing stock.
Read the availability result
Storefront availability includes stockPolicy, availableQuantity, purchaseEnabled, and availableForPurchase.
Use availableForPurchase for the purchase control and require a usable contextual price as well.
An inventory count alone does not establish publication, active status, or permission to purchase.
An out-of-stock state should preserve the product information and explain why purchase is unavailable. A missing price should be presented separately from missing stock.
Keep stock mappings stable
Synchronize by the SKU and supply-channel identity you manage. A SKU rename must also update the integration’s mapping. Check allocated quantities before lowering total stock or changing policy.
Adding an item to a cart does not guarantee a stock reservation. Read Allocation and inventory lifecycle, and use Configure prices, inventory, and tax for setup.