This topic describes how the following APIs calculate >availability. There are some release-specific considerations for updating stock levels.
Simple product
Returns true if
Product bundle
Returns true if
Base product
Returns true if all of the following conditions are true:
Product set
Returns true if all of the following conditions are true:
Identical to isOrderable(), except that the quantity must be greater than or equal to the specified quantity.
Product bundle
Identical to isOrderable(), except that the quantity must be greater than or equal to the specified quantity.
Base product
Identical to isOrderable(), except that the sum of orderable variation products must be greater than or equal to the quantity.
Product set
Identical to isOrderable(), except that the sum of orderable products in the set must be greater than or equal to the quantity.
Simple product
Returns true if
Product bundle
Returns true if
Base product
Returns true if
Product set
Returns true if
As above, but stock-level must be greater than or equal to the quantity, and the quantity must be greater than or equal to one.
Product bundle
As above, but stock-level must be greater than or equal to the quantity, and the quantity must be greater than or equal to one.
Base product
As above, but sum of variation product stock-levels must be greater than or equal to the quantity, and the quantity must be greater than or equal to one.
Product set
As above, but sum of set product stock-levels must be greater than or equal to the quantity, and the quantity must be greater than or equal to one.
Simple product
Returns availability status for quantity one. Possible statuses are:
Product bundle
Returns availability status for quantity one. See "Simple Product" column for possible statuses.
Returned status is computed based on the records of the bundled products and the record of the bundle if it exists, and represents the lowest availability status of the involved products.
For example, if all bundled products are IN_STOCK, but the bundle has a record and is NOT_AVAILABLE, method returns NOT_AVAILABLE.
Base product
Returns availability status for the variation product with the best availability for quantity one. For example, if all variation products are BACKORDER, but only one is IN_STOCK, method returns IN_STOCK.
Product set
Returns availability status for the set product with the best availability.
Simple product
Returns availability statuses for quantity. For example, if requested quantity is 10, and stock level is two, and product can be backordered, and backorder quantity is five, the method returns the following: IN_STOCK-2, BACKORDER-5, NOT_AVAILABLE-3
Product bundle
Returns availability statuses for quantity. Based on the rules described previously, but computation combines the availability levels of all bundled products and the bundle itself (if it has a record).
Base product
Returns availability status for quantity based on the variation products with the best availability.
Product set
Returns availability statuses for quantity based on the set products with the best availability
Simple product
Decrement product stock-level. Fails if ATS is less than the productLineItem.quantity.
Product bundle
If bundle has record, decrement stock-level of bundle. Decrement stock-levels of bundled product line items recursively. Fails if the available to sell (ATS) value is less than the productLineItem.quantity.
Base product
Fails if product line item is base product. A base product can't be ordered.
Product set
Fails if product line item is product set. A product set can't be ordered.
Uses the preorder/backorder allocation and the inventory list default-in-stock flag to calculate availability.