Integrating with Algolia
You can integrate Elastic Path Commerce Cloud with Algolia quickly and easily in Commerce Manager.
Whenever you publish a catalog, the full catalog will be synced to Algolia using an index name composed of the catalog name and the first part of the catalog ID. This is triggered using events delivered by a webhook.
- When a catalog is published, a
catalog-release.updated
event is triggered. - Once a
catalog-release.updated
event is received by the webhook, the integration begins to execute. - The integration performs the following:
- Builds a taxonomy for the catalog.
- Retrieves the mapping for Elastic Path Commerce Cloud fields to Algolia fields.
- Clears the Algolia index.
- Syncs all products to Algolia.
important
The Integratons Hub is currently in Beta. To gain early access and provide us with feedback on the Integrations Hub, contact your Customer Success Representative.
Collecting Your Setup Information
Before you begin configuring your Algolia integration in Commerce Manager, you need to collect the necessary setup information from Algolia and Commerce Manager.
important
Collect the following information and make sure you have it available, for example, in a text file, before configuring your Algolia integration in Commerce Manager. If you leave the Algolia Integration page in Commerce Manager, the integration is not saved and you must remove the integration and create a new one.
Collecting Agolia Setup Information
You can find this information in the Credentials section on the Algolia Dashboard.
Option | Description |
---|---|
App ID | Your Application ID for your Alogolia account. |
Admin API key | Your Admin API Key for your Algolia account. |
Collecting Commerce Manager Setup Information
The following Elastic Path Commerce Cloud API keys. You can find this information on the Home page of Commerce Manager when logged in as a user with Seller Admin privileges.
Elastic Path Commerce Cloud API Key | Description |
---|---|
API Base URL | Your Elastic Path Commerce Cloud API Base URL. |
Client ID | Your Elastic Path Commerce Cloud Client ID. |
Client Secret | Your Elastic Path Commerce Cloud Client Secret. |
Configuring The Integration
Now that you've collected the setup information let's begin by configuring the integration.
- Reach the Integrations Hub in Commerce Manager via method provided from your Customer Service Representative.
- Under EPCC Site Search Integrations click on the Algolia Full Catalog Sync Integration.
- Click Configure.
- In the text fields, input the setup information you collected previously.
- Click Activate.
The integration starts an execution which:
- Configures a webhook to listen to the
catalog-release.updated
event, named EPCC Algolia Integration. - Creates a flow for containing field mappings between Elastic Path Commerce Cloud and Algolia, called Algolia Mapping.
important
It is important that you don't delete the Algolia Mapping flow or the EPCC Algolia Integration webhook, or the integration ceases to work.
Now that you've configured the integration, let's learn how you use it.
Understanding Field Mappings Between Elastic Path Commerce Cloud and Algolia
To sync the catalog to Algolia you must map the data to pass from Elastic Path Commerce Cloud to Algolia.
The integration uses a flow to contain the fields that you want to pass from Elastic Path Commerce Cloud to Algolia. These can be any fields you like. There are some special fields and a default set which are created when you first configure the integration. See the table below.
The following table describes some example fields in Commerce Manager and their corresponding fields in Algolia.
Elastic Path Commerce Cloud Field | Maps to Algolia Field |
---|---|
attributes.productId | ep_product |
attributes.commodity_type | ep_commodity_type |
attributes.description | ep_description |
attributes.mpn | ep_mpn |
attributes.name | ep_description |
attributes.sku | ep_sku |
attributes.slug | ep_slug |
attributes.status | ep_status |
upc | ep_upc |
main_image | ep_main_image_url in Algolia. You can change the name in Algolia but if you also change the field name in Commerce Manager, the URL lookup function is not triggered. |
taxonomy | ep_categories. This field is used to trigger the creation of a hierarchy in Algolia. |
Creating New Field Mappings
- In Commerce Manager, go to the Algolia Mapping page under the Flows. (If you just configured your integration, refresh your Commerce Manager tab to pick up the newly added flow from the integration.)
- Click New Entry.
- Create the field mappings you desire by supplying the EPCC Field and the Algolia Field.
- In Algolia, create the fields described above. Refer to the documentation provided with Algolia for more information.