Integrations / Shopify

Inventory location indexing

Since December 31, 2023, apps can’t modify the code of Shopify themes. For more information, see The Asset API resource in the Shopify documentation. As an alternative, the Algolia AI Search and Discovery app comes with Shopify App Embed and App Blocks to integrate Autocomplete and InstantSearch. To get started, see Quickstart and Algolia configuration.

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 AI Search & 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 AI Search & 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?