Open navigation

How are product variants handled?

This article explains how Klevu manages product variants.

There are different types of products (e.g. simple, bundle, etc) and one of them is a Configurable (as known in Magento). A configurable product would usually have two or more variants associated with it and these variants are characterised by different attribute values associated with them(e.g. colour, size, material etc).

You can imagine a shirt that is available in three different colours (e.g. white, yellow and green) where each of these colours is available in three different sizes (e.g. Small, Medium, Large). In total, you can think of 9 variants of this product (i.e. white small, white medium, white large, yellow small, ..., green large)

Regardless of the platform, these variants are usually not visible on their own on the category pages but when the configurable product is selected its variant options are displayed to the customer on the product page. This is where the customer is asked to choose the relevant options of variants and buy one or more of the same.

How are the variants submitted to Klevu search?
At Klevu, when dealing with configurable products, we collect data (e.g. id, name, image, attributes etc) of each variant separately and index it independently as well.  At the same time, we index each variant's itemGroupID (i.e. the ID of the configurable product), which must remain the same for all the variants of a same configurable product.

Does Klevu show all the variants in search results?
No.  Eventhough, Klevu indexes all variants of a configurable product, when displaying the search results, it shows only one of the variants to the customer. Here, the variant to be shown is decided based on the query term submitted by the customer and the relevancy score calculated by Klevu's algorithm.

In the example of the shirt given above, if a customer searches for the keyword "shirt", it doesn't really matter which of the nine variants Klevu shows to the customer -- as long as the variant is one of their most selling variants or the one that has the highest relevancy score in the backend. For example, if the query is "white small shirt", we would show only the white variant that is available in the small size.

If Klevu shows one of the variants, how would a customer know there are others available as well?

There are two places where the customer is informed about the other variants of the same product.

First, next to the product name in the search results, we show a text with the exact number of other variants available for that query. For example, if the query was "shirt", Klevu shows the text "8 variants" next to the product name. Similarly, if the query was "white shirt" or "small shirt", Klevu would show "2 variants" next to the product name.

Second, when the facets are displayed, Klevu shows the relevant options available and let the customer choose whichever they like. For example, if the query is "shirt", Klevu shows two filters, colour with the values white, green and yellow and size with the values small, medium and large. Similarly, if the query is  "white shirt", only the size filter will be visible with the three options small, medium and large.

Depending on the selection of these values by the customer, the variant in the results will be displayed.

Is it possible to use the image of a configurable product?
By default, Klevu shows the image of a variant selected to be displayed in search results. In case the variant doesn't have its own image, Klevu uses the image of its configurable product. In case you want us to use the image of configurables (instead of the variant images), that too is possible. Please look at the documentation of the relevant platform to find out how to do it.

Is it possible to index only the configurable products?

If you would prefer that Klevu only indexed your configurable products, ie. without their respective variants, you can do this by implementing a custom data sync. We recommend using our Klevu Feed Format for this, and contacting Klevu support for help with disabling the OOTB data sync.

When generating your Klevu Feed, only include one item per configurable product, and within that one item please include an aggregation of data from all of its variants that you would like to be searchable. For both new Klevu merchants and those migrating from an existing Klevu data integration to the new Klevu Feed format, we recommend contacting Klevu support for some guidance to ensure the structure and integrity of your data, in particular their IDs.

Did you find it helpful? Yes No

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