Guide
Smart Recommendations

Recently Viewed

2min

If you haven't gone through the prerequisites and the v2 structure, please have a look at Overview

Klevu can power a recommendation banner showcasing any products which the customer has recently viewed. The most common placements for this banner type are:

Homepage: Recently Viewed By You Show a recommendation banner with products the current customer has recently viewed.

The end-point is used for retrieving recently viewed product recommendations.
POST
Request
Body Parameters
typeOfRequest
required
String
For this recommendation type, please specify SEARCH.
customANDQuery
required
String
Here we make a custom query to Klevu, since we know exactly which records we expect in the response. Specify the IDs of all of the products your customer has recently viewed, separated by OR
topIds
optional
Array
Use this field to specify the order the results should be returned, with the most recently viewed product coming first.
Request Body (JSON)
PHP
JS
Java
Node.js
Responses
200


Try it here!