Configure your data source
A source defines how to authenticate with your commercetools project, and which store and languages you want to index. In the Configure your data source form, paste the curl command from your commercetools API client. This automatically fills the form with details about your commercetools project and creates an authentication method.

- OAuth 2.0 authentication so that Algolia can connect to your commercetools project.
- API URL and Project Key to identify which project to fetch.
- Store and Languages to index.
- Fallback stock value which determines which value is stored in the Algolia record if there is no inventory information about the product.
Product query predicate
The product query predicate is an optional filter that gets appended to the product-projection endpoint in commercetools’ API when fetching product information. Only products returned by the commercetools API after applying this filter are indexed. For example:variants(prices(value(centAmount < 20000)))
—index products that have at least one variant with a price less than 200.masterVariant(attributes(name="Brand" and value="Algolia"))
—index products for which theBrand
attribute isAlgolia
.
Configure your destination
A destination defines where and how the data will be stored in the Algolia indices.
- Product. A record is assigned to each product.
- Variant. A record is assigned to each product variant.
You can see the records schema for each option in the Product schema section.
For more information about which model best suits your needs, see Ecommerce records.
Configure your tasks
A task is the link between source and destination. You run tasks to launch the indexing process.
- An On demand task that you can use to trigger a full reindex of your products. The task has a Failure Threshold setting that lets you specify a percentage of allowed indexing failures. For example, a failure threshold of 10% requires 90% of your records to import without errors.
-
A Subscription task that automatically updates indexes when a product changes and is published in commercetools.
The Subscription task has two options:
- Partial record updates. Only attributes coming from commercetools are updated in the existing records. If your records have attributes added from another source, they won’t be updated. If a record doesn’t exist, it will be added.
- Full record updates. The existing records are replaced with commercetools records (see Product schema). If a record doesn’t exist, it will be added.

You won’t see your products in your Algolia index until you trigger a full reindex.
Trigger a full reindex
After installing a commercetools connector, you need to trigger a full reindex at least once. You should also reindex if you changed, added, or deleted a source or a destination. To trigger a full reindex, run the On demand task by clicking Run task:
