🎉 Try the public beta of the new docs site at algolia.com/doc-beta! 🎉
Integrations / Shopify

Inventory location indexing

From December 31, 2023, Algolia’s Search and Discovery application can’t modify the coding of Shopify themes. For more information, refer to Shopify’s Asset API documentation. As an alternative, Algolia offers Shopify’s App Embed and App Blocks features for Autocomplete and InstantSearch interfaces. For more information, refer to the Quick start and Shopify Algolia configuration documentation.

Support for Shopify Locations is a beta feature according to Algolia’s Terms of Service (“Beta Services”)

Shopify Locations is a feature to track inventory quantities by physical locations. A location can be any place where you change inventory quantities, such as retail stores or warehouses.

Indexing locations and their inventory quantities with Algolia lets you use location-based features, such as searching and filtering by location or BOPIS (buy online, pick up in store).

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:

  1. In your Shopify admin, open the Algolia Search and Discovery app.

  2. Go to the Indexing tab.

  3. In the Products section, select Index inventory locations (BETA) and click Save. This triggers a product reindexing.

    Update product indexing settings in the Algolia Search and Discovery app

    You might need to update your store permissions before you can enable locations indexing. If you see a message with a request for additional read access permissions, click Update Store Permissions.

    Additional permissions required to enable locations indexing

  4. When the reindex is complete, check your products records for the new locations_inventory attribute.

Schema

Inventory locations are added as individual key-value pairs to the locations_inventory attribute for 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:

1
2
3
4
5
6
7
8
{
  // ...
  locations_inventory: {
    "123456789": 10,
    "987654321": 5,
    "123123123": 0
  }
}

Next steps

To share feedback about this beta feature, send an email or join the Community.

Did you find this page helpful?