Using the Klevu integration

The Klevu integration brings your structured content from Klevu into the composition layer, Uniform Canvas. Team members can now leverage your Klevu content, along with data from any of your other sources, to create experiences without needing a developer.

Once you've installed the integration, the next step is to connect your Klevu search endpoint to your Uniform project by creating a new data source.

  1. Navigate to Experience > Data Types. A data type is an element that can be retrieved from a data source, so the first step is to identify a data source.

  2. Create a new data source by clicking the Add data type button and select the "Create new" option under the Klevu label.

    add-data-source
    Add a data type.
    create-klevu-data-type
    Where to create a new data type from the available data sources.
  3. Enter the credentials.

    configure-klevu-data-source
    Configure data source
  4. Name your data source. Choose a name that helps to inform your editorial users where the content is coming from.

Before you start connecting Klevu content to your Uniform compositions, it's important to first create some data types.

  1. Go to Experience > Data Types and click the Add data type button from below the Klevu data source that you set-up earlier.

    add-klevu-data-type
    Add a data type after selecting the data source.
  2. Next, you will want to select and configure an archetype from the options below.

The query archetype will return a list of product records containing the queried terms. This can be useful for dynamic queries where the most up-to-date information is needed.

Once you configure the archetype, you can test to see what JSON data would be returned when it's used in an experience.

klevu-products-query-data-resource
Products Query data resource.

The single item archetype will return a single product from Klevu, based on a selection by the editor in Uniform. This is useful for non-list elements that render as an independent item. It can accept a variable from a dynamic token (such as a slug) and retrieve the corresponding record.

klevu-single-product-data-resource
Single Product data resource.

The archetype lets an editor hand pick multiple entries to render as a list. This is useful when a small selection of specific records is required, such as in a "featured products" carousel.

klevu-multiple-products-data-resource
Multiple Products data resource.

Next steps

Now you are ready to bring content directly into your components in Canvas:

  1. Open any composition
  2. Find component which parameter you want to connect to content from Klevu
  3. Click on the connect icon next to the parameter.
  4. You will be prompted to create a new data resource using one of the data types you created.