For most API methods for recommendations, you will need to provide the Product Box ID.
It is important that you bundle the product recommendations to ensure no duplicates.
Get Product Recommendations

Details about passing filter values (crawledData) to getProductBoxes()

In some situations, it makes sense to filter which products are returned from the product recommendation engine. Maybe you want products cheaper than a certain limit, only products from a specific brand or category. This can be done by adding filtering to the recommendation engine. It is possible to pass values to use for filtering the recommendation API call. The algorithm needs to be configured by Hello Retail before it can accept filter values as input. So get in touch with [email protected] to get help configuring the algorithm.
All parameters are sent in the query string. The parameter name for passing filter values is crawledData. The filters must be sent per recommendation box and you should supply the filter name.
Brand filter Passing a brand filter with the value “Nike” for a box with the ID 123 will look like this in the query string:
Categories filter In the Hello Retail backend categories are stored in a field called hierarchies that contains a list of category hierarchies the product is in. So a product can be in multiple hierarchies at once. As an example, a pair of women's sandals on sale could have the following hierarchies:
[ ["Shoes", "Woman"], ["On sale", "Woman"], ["Sandals"] ]
So these sandals are in the “Woman” subcategory below the “Shoes” category, they are also in the “Woman” subcategory below the “On sale” category, and finally, they are in the “Sandals” category.
So when passing a filter value for filtering on hierarchies the passed filter value needs to follow the same structure but encoded as query string variables. So if we wanted to pass a filter saying that the products must be in the “Woman” subcategory below the “On sale” category the query string would look something like this:
&crawledData[123][hierarchies][0][]=On sale&crawledData[123][hierarchies][0][]=Woman&
As you can see, you need to supply the index for the first level in the hierarchy, but for the second one, you can pass an empty set of square brackets, and the ordering of the parameters will decide the numbering.
It is possible to pass multiple hierarchies to one filter. So if you wanted to find “Woman” “Shoes” that are also “Sandals” you could pass the filter:
extraData & extraDataList The examples above are reserved attributes in the Hello Retail backend. Everything besides these must have extraData or extraDataList in front. The declaration of these variables needs to be configured by Hello Retail before it can be used as crawlData parameters. So get in touch with [email protected] to get help configuring the algorithm. So when passing an extraData or extraDataList filter value for filtering on lists or single values, the structure has to follow this: