Integration
To integrate your Klevu API keys with your Magento store.
- Login to Magento admin
- Navigate to Stores > Configuration > Klevu > Integration
- Select the store from the table to integrate and click Integrate Store in the actions column.
- A modal will open containing the integration form.
- Enter the API key and Auth Key provided in KMC and click Check API Keys
- An API call will check if the provided keys:
- are for an enabled account,
- are registered for a Magento store,
- are set up for JSON indexing and not XML indexing
If this validation fails, error messages will be displayed at the top of the modal with more information.
- Account Details will be displayed for this account. Ensure this is the account you wish to integrate with this store. If so, click Save API Keys This step may take a moment while. There are 3 processes running:
- Trigger Attribute Discovery - find all your attributes, calculate if they need to be registered with Klevu and populate the klexu_indexing_attribute table.
- Trigger Attribute Registration - registering those attributes, via API, that need to be registered with Klevu to enable entity sync.
- Queue Entity Discovery - add a cron task to find all your entities, calculate if they need to be indexed with Klevu and populate the klexu_indexing_entity table. This step is triggered via cron rather than synchronously as it can take some time depending on how many entities (categories, CMS pages and products) your store has.
- At this point the integration is complete. The remaining steps guide you where to find certain settings within the Klevu plugin related to frontend, analytics and indexing. These steps can be skipped by closing the modal if you desire.
Note: The discovery and indexing of entities is not triggered during the integration, but is handled via the cron. In a production environment the cron must be running, however, while testing the cron may not be running. Entity indexing can also be triggered via CLI (see Indexing - Entities).
As with all cron tasks added by version v4.x of the Klevu integration, entity discovery and sync cron tasks use the dedicated klevu group, allowing granular configuration of scheduling and run options.
We recommend using the native Magento cron to run these jobs, configuring schedules if necessary, rather than a custom server-side cron implementation of the CLI command.