Shopify API - Sold out problem for inventory_management <> "shopify"

Hello,

We have a problem for items marked with inventory policy “Not tracked by Shopify”. Shopify shows these products as available (NOT sold out) even when inventory_quantity <= 0 and “Continue selling when out of stock” is false, but Algolia API indicates sold out (inventory_available = false)

I have seen that there was the same problem here (Shopify - Sold out problem for "Don't track inventory" items), but the response is different in the API (field “inventory_available”). Is it possible to apply the same behaviour on the API?

Changes wanted in Shopify API:

-            product.can_order = product.inventory_policy === 'continue' || product.inventory_quantity > 0;
+            product.can_order = (
+              product.inventory_management !== 'shopify' ||  <=== THIS condition isn't present in API
+              product.inventory_policy === 'continue' ||
+              product.inventory_quantity > 0
+            );

Any updates on this issue?

To be clear: this is a critical bug in Algolia’s Shopify app. When transforming Shopify product data to feed into the index, the app computes the boolean inventory_available attribute representing whether the product is avaliable or not. This field is essential to perform proper ranking/sorting. However, Algolia’s app incorrectly assumes some products are not available (inventory_available: false) when in fact this is not the case. This occurs for all products with the “don’t track inventory” option enabled, which is the default and can be determined by inventory_management != 'shopify'. In this case, the product is always available, regardless inventory_quantity value (even zero), so inventory_available should be true.

Please fix inventory_available attribute logic for products with “don’t track inventory” option enabled (inventory_management != 'shopify').

1 Like

Is there any response on this at all? As far as I can tell this bug still exists.