Several stock and inventory properties are included in the system on a product basis.
That is, for each product the system manages these properties:
Type (type)
Represents the type of the product that owns the stock item. Defaults to simple.
Qty (qty)
Indicates the available quantity of the product. Note that this value could be decimal for those products that can be sold by partitionable units. Also this value could be negative in case of using backorders. Defaults to 0. Note that this will be different for configurable products, where the available quantity needs to be managed by variant
Stock Status (status)
The status of the stock for the product. Defaults to "out-of-stock".
Possible values:
"in-stock"): The product ready to be ordered."out-of-stock"): The product is temporarily not ready to be ordered."discontinued"): The product is permanently not ready to be ordered.Managed Inventory (managed)
Indicates if the quantity in stock of the product is managed by the system. Defaults to true.
Possible values:
true): The product quantity in stock is managed by the system.false): The product quantity in stock is managed externally.Backorders (backorders)
Indicates if the product support backorders. That is, if it is possible to order more quantity than the available in stock. Defaults to false.
Possible values:
true): The product can be backordered.false): The product cannot be backordered.Min. Qty to Order (minQty)
Indicates the minimum quantity admitted of the product in an order. Defaults to 1.
Max. Qty to Order (maxQty)
Indicates the maximum quantity admitted of the product in an order. If empty, the limit does not apply.
Children (children)
Lists the ids of the children stock items. Only valid for configurable stock items.
Children (children)
Id of the parent stock item. Only valid for variant stock items.
The cart services must control the availability of the products in different moments:
The inventory services must update the stock qty available of a the involved products when a cart is confirmed to be converted to an order. This is a critical point when the system must ensure the operations are atomic, so no stock updates are missed when parallel requests occur.
The availability of the products is returned in the scoped product listing services as well as in the individual product retrievals.
Definition of Availability:
A product is available if:
AND:
Stock Status is In StockOR:
Managed InventoryBackordersQty is greated or equal to its Min. Qty to OrderAND:
Stock Status is In StockOR:
Managed InventoryBackordersQty of at least one children is greated or equal to the confiruable Min. Qty to OrderAND:
Stock Status is In StockOR:
Managed InventoryBackordersQty is greated or equal to parent's Min. Qty to OrderIn the product edition form there is a new tab "Inventory" to be able to edit the different fields mentioned in section Inventory Information.
In the PDP and PLP pages, the non available products have a badge over the image spelling "Out of Stock". For those products, the buttons to add to the cart are disabled. In order to determine if a product is available, check the Definition of Availability in section Behavior > API > Catalog.