Variant A has 2 inventory in location A
Variant A has -2 inventory in location B
Location A is defined as fulfillment location.
Location B → fulfillment disabled in settings → locations
Shopify labels the variant (product) as sold out both in storefront and in APIs. We expect it to sum the fulfillment locations only and decide if the item is sold out or not.
You can easily reproduce this using the Shopify admin; no API usage is required. I will share screenshots separately.
Ticket ID: 41943729 (created in 2023)
Summary:
Since Shopify calculates total inventory across all locations, regardless of whether a location is enabled for fulfillment, the product is labeled as sold out when the total inventory is non-positive. In the case below, the product has 3 units available in a fulfillment location, but it is still labeled as sold out, causing lost sales. This happens because Shopify sums inventory from both a fulfillment and a non-fulfillment location.
Our expectation is that the algorithm should sum only fulfillment-enabled locations and determine in-stock or sold-out status accordingly.
Current algorithm as explained by Shopify support:
1- Sum total inventory across all locations. If the result is non-positive, mark the product as sold out. (This is where the system causes lost sales.)
2- If the total is positive, check whether the available unit is stocked in a non-fulfillment location. If so, label the product as sold out.
3- If the unit is stocked in a fulfillment location, check shipping availability at checkout and disable the sale if necessary.