Open navigation

Integration Steps for Commercetools

The integration of Klevu with your Commercetools store involves the following steps:

  • Commercetools API Client: Setting up an API client to access the catalog.
  • Account Setup: Signing up with Klevu account.
  • Headless Frontend: Integration of product discovery using Klevu's headless library.

Commercetools API Client

Klevu only perform read-only action using API client created by the site owner
Once an API client has been created, it can not be changed anymore. The secret is only visible in the response when creating the API Client.

To access the catalog setup in Commercetools, the site owner/developer would require to setup an API client. Here are the steps for the setting up the API client:

  1. Navigate to Settings -> Developer Settings.
  2. Click on create new API client.
  3. From the Scopes dropdown select Read-only client, and make sure all fields under View column are checked as described below.
  4. Once you have added all the required details, it will generate the Sunrise SPA file aka env.local. Please save this file to share with Klevu support team. 

Account Setup

Please use below template to share the details with Klevu team by submitting a support ticket

When you share the details, please remember to replace {{text}} with actual values.

  1.  {{Email_address}} to set up a Klevu account. 
  2.  {{sunrise_spa_file}} aka env.local downloaded while creating commercetools client.

  3.  {{frequency}} at which you want Klevu to monitor your feed for changes (e.g. every 30 mins, 2 hours, 12 hours).

  4.  {{three_digit_base_currency}} and {{two_digit_language_code}} of your store (e.g. USD and EN)

  5. {{pattern}} for your product and category URLs (e.g. https://something.com/products/<slug>, https://something.come/collections/<slug>)

  6. If you want only channel-specific price lists to be indexed, the list of channel {{keys}} (and not the ids).

  7. The {{plan}} and {{solutions}} you would like to try. 

Headless Frontend

With Klevu’s brand new SDK library, you can pull the power of AI product discovery into any JavaScript ecosystem. It simplifies development giving you more time for innovation. Our SDK brings you the data from search, smart categories and recommendations as JSON. Then you can decide how to render this information. 

For more information on how to integrate headless frontend, have a look at this link. 


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.