Advanced Filtering Support for Recommendations and Pathways

The Recommendations and Pathways V2 APIs support complex boolean queries using Advanced Filters.

Similar to the efq filter for Search and Category, the complex boolean filters can be applied to Recommendations result sets to include/exclude the products using the Product Attributes in the customer feed that is valid and fits the parameter values.

Recommendations and Pathways APIs also support filtering on SKU attributes. Refer to the table below to learn about range filtering support for Pathways and Recommendations widgets.

Range filteringPathways widgetsRecommendations widgets
Range filtering on product-level attributesSupportedSupported
Range filtering on variant-level attributesSupportedNot supported

Read more about SKU attributes in the SKU Select API page.

Filter Operators

  • OR: Includes items that belong to a specified set.
  • AND: Include items that belong to all specified sets.
  • NOT: Excludes items that belong to the specified sets.
#Returns all cotton products and all linen products
&filter=fabric:[cotton OR linen]
#Returns all products that are both cotton and linen
&filter=fabric:[cotton AND linen]
#Returns all cotton items that are not linen
&filter=fabric:cotton 
&filter=-fabric:linen

📘

Learn more about the filter parameter and its usage in the Recommendations and Pathways Parameters Reference.