Adobe Commerce automatically applies non-configurable default filters to recommendation units. If you have multiple recommendation units deployed to a page, Adobe Commerce filters out any products that are repeated in the units. Only the first reference to a repeated product is used, to make room for other products to be recommended. Adobe Commerce also filters out any previously purchased products and those that are in the cart.
When you create a recommendation unit, you can define filters that control which products can be displayed in recommendations. These filters are based on a set of inclusion or exclusion conditions that you define. Only products that match all inclusion conditions appear in recommendations. Products that match any of the exclusion conditions are not recommended.
You can configure multiple filters and enable only those you want by selecting the toggle on each filter page. This allows you to create drafts of filters for future use. The number of enabled filters is displayed on each tab.
Conditions can be static or dynamic.
A static condition uses existing product attributes to determine which products can appear in the unit. For example, you can specify that only in-stock products with a price greater than $25 appear in the unit. Static conditions are available on all page types.
A dynamic condition keys off a shopper’s current context, such as the currently viewed category or product. For example, when creating a product recommendation to be deployed on product detail pages, you can create a condition to recommend only products that are within a relative price range of the currently viewed product. Dynamic conditions are available on every page type except the Home page and on pages with recommendations that are placed with Page Builder.
The logical operators
OR are used to join multiple conditions. If using both inclusion and exclusion filters, the inclusions are evaluated first to determine all possible products that can be recommended, then products that match any exclusion filters are removed from the list.
AND- Joins two inclusion-filtering conditions
OR- Joins two exclusion-filtering conditions
Inclusion and exclusion filters replace the legacy category exclusions in versions 3.2.2 and later of the
magento/product-recommendations module. See the release notes to learn more about Adobe Commerce releases.
Filters based on a product’s category use direct category assignments and their subcategories. For example, enabling an exclusion condition for category
Gear excludes products assigned to
Gear and all of its subcategories such as
Gear/Fitness Equipment. For B2B merchants, the Category filter adheres to any [customer-specific product categories]https://experienceleague.adobe.com/docs/commerce-admin/catalog/categories/category-permissions.html) you have configured.
Adobe Commerce recommends you use the following category filter configuration when you deploy recommendations to your page types:
|Home||Do not filter products.|
|Category||Filter products in the specific category.|
|Product Detail||Filter products in the same categories.|
|Cart||Filter categories of products in the cart.|
|Order Confirmation||Filter categories of products purchased.|
Product filters specify which specific products are eligible, or not eligible, to be displayed in recommendations. You cannot select products that are disabled or not visible individually because those products can never appear in recommendations.
A filter based on product type either includes or excludes all products of a specific type. Supported types include Simple, Configurable, Virtual, Downloadable, or Gift card. Bundle and Grouped products are not yet supported.
Filters products based on visibility, such as: Catalog, Search, or both.
A filter based on the product price uses the final price to perform the comparison. The final price includes any discounts or special pricing available to anonymous shoppers. For B2B merchants, the price displayed reflects the customer-specific group pricing you have configured.
The following exclusion filters can be used to filter out products based on stock status: