Using recommendation filters
Filter recommendation results using an exact term or a numeric range filter. You can place these filters at the request level or the widget level. We recommend using request-level filters because you can apply the filter to all widgets in a batch request.
You can also apply filters for product or SKU-level attributes, including locale or store-specific attributes.
The following sections show some examples of filters for recommendations.
Exact term filtering on the homepage widget
The following code shows a request for exact term filtering. In this example, you filter on the homepage widget for medium (M) or large (L) products.
Exact term filtering on the PDP widget
The following code shows a request for exact term filtering. In this example, you filter on the PDP widget for red (rouge) or blue (bleue) products for the French variant of the site.
Numeric range filtering on the PDP widget
The following code shows a request for numeric range filtering. In this example, you filter on the PDP widget for products with final_price between 10 and 50.
Filtering on cart widget for products matching a specific fitment
The following code shows a request for filtering on the cart widget. In this example, you filter on the cart widget for products matching a specific fitment for the automotive industry.