Understand inventory

This section describes the data that Commerce uses to track inventory.

Commerce maintains the following inventory data that determines the availability of each SKU:

  • stockLevel is the number that can be purchased.
  • preorderLevel is the number that can be preordered.
  • backorderLevel is the number that can be backordered.

If stockLevel is not 0, then the SKU is in stock.

If stockLevel is 0 but backorderLevel is not 0, then the SKU is backorderable.

If stockLevel and backorderLevel are both 0, but preorderLevel is not 0, then the SKU is preorderable.

If all three levels are 0, then the SKU is out of stock.

In addition to inventory levels, Commerce maintains the following inventory data for each SKU:

  • stockThreshold is the threshold at which the status of the SKU changes to out of stock.
  • preorderThreshold is the threshold at which the status of the SKU changes from preordered to out of stock.
  • backorderThreshold is the threshold at which the status of the SKU changes from backordered to out of stock.
  • availabilityDate is the date on which the SKU becomes available.
  • availabilityStatus is the status of the SKU, for example, preordered, backordered, or out of stock.