Commerce
Inventory
Inventory items, stock locations, levels, and reservations.
Stock is tracked on inventory items, not on variants. A variant is linked to one inventory item by default, or to several (an inventory kit, for bundles). Each inventory item has a level per stock location.
Variant settings
| Field | Effect |
|---|---|
manage_inventory | When false, the variant is never checked or reserved. Use it for services or made-to-order items. |
allow_backorder | When true, the variant can be ordered with no stock. Reservations are still made. |
Levels
| Quantity | Meaning |
|---|---|
stocked_quantity | Units on hand at the location. |
reserved_quantity | Units held for placed orders that aren't fulfilled yet. |
incoming_quantity | Expected units. Informational only; it doesn't count as available. |
available_quantity | stocked_quantity minus reserved_quantity. |
Availability in a storefront
- Request
+variants.inventory_quantityon product routes. It is the available quantity across the stock locations linked to the request's sales channel. - Adding to a cart and completing it both check stock the same way. A location not linked to the cart's channel never counts.
- With an inventory kit, ordering one unit needs
required_quantityof each linked item.
Reservations
| Event | Effect |
|---|---|
| Cart completed, or draft order converted | A reservation per line, at a location serving the channel. |
| Fulfillment created | Reservation consumed and stocked_quantity reduced. |
| Fulfillment canceled | Stock and reservation restored. |
| Order canceled | Reservations deleted. |
| Return received | Returned units added back at the chosen location. |
Carts and open draft orders hold no stock. Two buyers can have the last unit in their carts; the first to complete gets it.
Merchants can also create manual reservations, for example to hold stock for a pending deal.