Guide
Smart Search

Personalisation

8min

The personalisation is an add-on feature. To enable the option, please submit a support ticket

When a customer enters a physical shop, they may express their preferences to an in-store assistant by highlighting the colours they like, the brands they prefer and what they have purchased before.

The in-store assistant would then use this information to show the customer products they are most likely interested in first, before showing them any others that still may be suitable.

Klevu A.I. is your online assistant.

This personalisation can be provided in two ways:

  1. including some information about the customer's browsing history with each request
  2. defining your own boosting rules based on the information you already know about the customer

You can read more about how this works in our Personalisation Guide.

Browsing History

If you provide the IDs of products which the customer has recently interacted with, the Klevu A.I. will figure out the common aspects of those products and influence the search results.

The easiest way to highlight this is with an example:

  • In the JSON below, the four record IDs provided within context represent the products that a customer has clicked on before making a search. They all have the brand 'MNH'.
  • There may be other attributes those products have in common, such as price, color, material, etc., however, we have specified in the query that we are only interested in personalisation based on 'brand'.
  • When you execute the query, you will see some brand 'MNH' results are coming first.

Note that the impact of personalisation is not always apparent. Klevu is clever. If the customer has recently been looking at 'shoes' but now they are searching for 'washing machines', Klevu will know to disregard any interactions that are not relevant to the current search query.

This is an example how to utilize the recently visited products to personlised the search results.
POST
Request
Body Parameters
enablePersonalisation
required
Boolean
This must be set to 'true' for enabling personalisation on a particular request. If set to 'false', the recent objects within the context object will be ignored
fields
optional
Array
This is an optional field. By default, Klevu will analyse all attributes of the records the customer has interacted with, in order to determine the common patterns. If you prefer to focus on particular aspects, for example brand or price, specify those attributes within this object.
recentObjects
optional
Object
Use this object to specify the records (e.g. products, categories, etc.) that were recently interacted with by a customer. Please only specify one recentObject object per record type, one for all KLEVU_PRODUCT entries, another for all KLEVU_CMS pages visited, etc. Each recentObject object may contain multiple record objects (e.g. 5 recently viewed products). The most recently clicked record should be the first element in the array.
Request Body (JSON)
PHP
JS
Java
Node.js
Responses
200


Try it here!



Known Preferences

If you have already built up a profile of your customer and would like to use what you know about them to promote certain results, you can use the boost object within each record query.

There are three ways the records can be boosted:

  • filter conditions
  • keywords or phrases
  • IDs of specific records

For example, let's say you have an online store with an area where customers can log in.

  • From your store's purchase history, you know that one customer is particularly interested in the brand 'KKE'.
  • From your analytics data, you also know the same customer also looked at the product detail page of the product with ID: '31366487375934' many times.
  • Finally, you have an area where customers can specify keywords of their interests, and this customer wrote 'comfortable'.

As a merchant with all of this information available, you can build up a profile about this customer. The sample to the right shows how you would convey this information to Klevu during a search.

To find out more about how boosting works with your existing merchandising rules, please read this article on How Personalisation Works.

This is an example how to boost products based on users preference.
POST
Request
Body Parameters
filters
optional
Array
Specify filter values to apply a boosting score to. They key is the unique identifier of the attribute, eg. Color. Each of the values represents the value of that filter to boost, eg. red or blue.
keywords
optional
Array
Specify keywords or phrases to apply a boosting score to, for example "comfortable".
records
optional
Array
Specify the Klevu ID of any records to apply a boosting score to.
weight
optional
Number
The boosting value to be applied, a decimal between 0 - 999. Please specify values above 1 for boosting the records up the rankings, and a value of 0 to 1 to de-boost records down the rankings.
Request Body (JSON)
PHP
JS
Java
Node.js
Responses
200


Try it here!





Updated 30 Oct 2023
Doc contributor
Doc contributor
Doc contributor
Doc contributor
Did this page help you?