Open navigation

Integration Steps for Shopware

The integration of Klevu with your Shopware store involves the following steps:
  • Shopware Access Keys setup: setting up an Access Key ID and a secure Access Key to allow Klevu to access your catalog.
  • Account setup: Signing up with Klevu.
  • Frontend integration: Integrating Klevu’s JS templates on your website to power up search/Category Merchandising/Recommendations.
Note : If your website is using Shopware 5, please consult the provided document for instructions on setting up Klevu on your store, as Klevu currently only supports integration with Shopware 6.

Shopware Access Keys setup

Klevu only performs read-only operations through APIs, leveraging the Access Key ID and Secure Access Key for authentication.

To get Access Key ID and secure Access Key, You begin by creating the user in the admin and assigning it a specific role. The permission to access a specific section can be set up when creating a role. The detailed guide to creating the User and Role is given in the link but here we will discuss it briefly. 

Creating a Role

In your Shopware admin panel, go to admin > Settings > System > Users and Permissions > Roles > Create Role. 

A role can be created and permissions can be set up to access some of the sections. We have only set up the permissions required to fetch data.

We need the permissions of below area:

Catalogue - View permission for all sub-areas

Content - View permission for all sub-areas

Orders - View permission for all sub-areas

Settings - View permission to below sub-areas

Currencies, Custom fields, Customer groups, Languages, Rule builder, Tags, Tax.

Here's an example screenshot. To view it in a larger size, please click on it.  

Create a User

Create a user by visiting admin > Settings > System > Users and Permissions > Users > Create New User. While creating a User, you can assign the role Role you created in the previous step. See the below screenshot:

Get Access Key ID & Secure access key

The Access Key ID and Secure access keys are created at the user level. As can be seen in the above screenshot, please click on the Integrations and Create Access Key button.

Store these keys locally. Now, click on the Save Integration to save it.

Once you get the Access Key ID & Secure access key, you need to save the User.

Account Setup

Create a support ticket and use the following template to share the details with the Klevu team. 

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

  1. {{Email_address}}, to set up a the Klevu account. 
  2. {{base_url}}, base URL of the store that Klevu will use to execute the API requests.
  3. {{access_key_id}} & {{secure_access_key}}, for authentication.
  4. {{frequency}}, at which you want Klevu to monitor your feed for changes (e.g. every 30 mins, 2 hours, 12 hours).
  5. {{language_id}}, the language ID of the store (e.g. 2fbb5fe2e29a4d70aa5854ce7ce3e20b ), in case shopware integration has multiple languages and you want to setup the Klevu for all, please share all language IDs.
  6. {{sales_channel_id}}, the sales channel ID of the store, in case the shopware integration has multiple sales channels and you want to setup the Klevu for all, please share all sales channel IDs.
  7. {{timezone}}, timezone of the store e.g. UTC. Klevu use it for delta updates.
  8. The {{plan}} and {{solutions}} you would like to try.

Frontend Integration

There are two possible ways Klevu can be integrated on a Shopware website:

Shopware Native Implementation

If the website is built on the Shopware's native frontend implementation,  there are a couple of ways to implement Klevu search:

1. Klevu Template JS

The Klevu template JS code has been injected into the theme files, and we have made the plugin theme available. To download it, please use the link provided that corresponds to your specific solution.

Klevu Search - KlevuSearch.zip

Klevu Search and Category Merchandising - KlevuSearchCatnav.zip

Klevu Search, Category Merchandising & Recommendations -  KlevuSearchCatNavRecs.zip

Klevu Search & Recommendations - KlevuSearchRecs.zip

Please remember that in the theme files indicated above, the values for the API key, Cloud Search URL, and Recs ID (for recommendations) should be replaced in the fields KLEVU-JS-API-KEY, CLOUD-SEARCH-URL & RECS-BANNER-ID respectively. To obtain the API key and Cloud Search URL, you can follow this link. For the recommendation banner, please visit the provided link.
The theme files are an illustrative example of how the Klevu JS code can be injected into a theme. If you encounter any conflicts within the theme, please refer to the Shopware theme guidelines to resolve them. If you require additional information about the Klevu template JS, please visit the provided link.

2. Klevu SDKs

The Klevu has JS SDKs which can be used on the frontend. Please visit the link for more details.

Headless frontend Implementation

If the website is built on the Headless frontend, the solution is to use Klevu’s SDK library. 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.