Stock items
During an order, the inventory is checked to determine the product's availability based on the quantity requested. In this section, you will learn about stock items and how to define the available inventory of an SKU in a given market's stock location.
What is a stock item?
A stock item is the inventory of an SKU in a given market's stock location. The actual available inventory may differ based on stock reservations. When an order is approved, the stock item quantities decrement. When a return is approved and the associated items are restocked, the stock item quantities increment.
When a user creates a new stock item, the associated SKU must be available in one of the market's stock locations. Its quantity determines the value of the stock before adding it to the inventory.
How stock reservation is managed
Unless a stock reservation has been manually triggered before, the stock associated with an order's line items is automatically reserved when the order is placed by creating the related stock reservations in pending status. Stock item quantities aren't decremented and the stock item's actual availability corresponds to the stock item quantity minus the reserved stock quantity. Once the order is approved, the stock item quantities are decremented. If an order is cancelled, the reserved stock is released becoming available again. In both cases, the involved stock reservations are deleted.
The stock associated with a line item of type SKU or bundle can be reserved before the order's placement via trigger attribute using an integration application (for security reasons). In this case, the related stock reservations are created in draft status and moved to pending as soon as the order is placed. Manually triggered stock reservations have a default expiration date (after 1 hour) that can be changed by updating the stock reservation cutoff at the inventory model level. If the order isn't placed before the expiration date or the line item is removed, the corresponding reserved stock is released. Once the order is placed the stock is reserved until the order is approved or cancelled.
Stock reservations act on the whole line item quantity. If the available stock is split between different stock locations, multiple stock reservations are created.