This is a beta feature according to Algoliaβs Terms of Service (βBeta Servicesβ).
Turn on inventory location indexing
Make sure your store is set up with more than one location on Shopify. This results in additional API requests to Shopify, which can delay indexing if Shopify imposes rate limits on these requests. To turn on inventory location indexing:- In your Shopify admin, open the Algolia AI Search & Discovery app.
- Go to the Indexing tab.
-
In the Products section, select Index inventory locations (BETA) and click Save.
This triggers a product reindexing.
If you see a message with a request for additional read access permissons, click Update Store Permissions.
-
When the reindex is complete, check your products records for the new
locations_inventory
attribute.
Schema
Inventory locations are individual key-value pairs in thelocations_inventory
attribute of each product record.
The key is the location ID (auto-generated by Shopify), and the value is the inventory quantity at that location.
The following example shows the location_inventory
attribute with three locations:
JavaScript