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)
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').