Configure Recommenders

To use product recommendations, you must first configure one or more recommenders. You can think of a recommender as a service that you can ask for a list of recommendations (a list of product IDs).

The purpose of a recommender is to:

A recommender configuration specifies one or more strategies that determine what approach the system uses to generate a list of product IDs. The configuration also specifies zero or more rules that enable you to manipulate the list, controlling its composition and order.

When you configure a recommender, you must give it a unique name. This name then appears in Business Manager when you create a content slot configuration for the recommendations generated by the recommender.

Each recommender configuration must be one of four recommender types. The recommender type determines which strategies are available when you configure the recommender. For example, a recommender type of Recently viewed uses different strategies than the recommender type Products in a category.

After you understand recommender types, strategies, and rules, you can configure a recommender for product recommendations.

Recommender Types

There are four supported recommender types, described in the following table:

Type Description Available strategies
Product to product

Given a specific product, generate recommendations by analyzing the product's similarity to other products, or by analyzing the viewing or purchasing behavior of other customers.

Storefronts typically place product-to-product recommendations on the:

  • Product detail page
  • Cart
  • Mini-cart
  • Wish-list
  • Checkout
Note: Deploy this recommender type only on pages that have product anchors(PDPs, Cart). Do NOT deploy on pages that have category anchors (category pages) or pages that have no anchors at all (home page, My Account page).
  • Product Affinity Algorithm
  • Customers who viewed also viewed
  • Customers who viewed ultimately bought
  • Customers who bought also bought
  • Real Time Personalized Recommendations
Products in a category

Given a specific category, generate recommendations for products that are in the category.

Storefronts typically place products-in-a-category recommendations on the category page.

Note: Deploy this recommender type only on pages that have category anchors (category pages). Do NOT deploy on pages that have product anchors (PDPs, Cart) or pages that have no anchors at all (home page, My Account page).
  • Real Time Personalized Recommendations
  • Recent Top-selling Products
  • Recent Most-viewed Products
Products in all categories

Generate recommendations across all categories.

Storefronts typically place products-in-all-categories recommendations on the:

  • Home page
  • My Account page
  • My Recommendations page
Note: Deploy this recommender type only on pages that have no anchors (home pages, My Account page). Do NOT deploy on pages that have product anchors (PDPs, Cart) or pages that have category anchors (category pages).
  • Real Time Personalized Recommendations
  • Recent Top-selling Products
  • Recent Most-viewed Products
Recently viewed

Generate recommendations by simply including products recently viewed by the customer.

Storefronts can place recently-viewed recommendations on any page.

  • Customer recently viewed items

Strategies

Strategies represent different approaches―different algorithms―for generating lists of recommendations (product IDs). When generating a list of recommended product IDs, Commerce Cloud Einstein employs one or more of the strategies listed in the table.

Each recommender configures its strategies in a specific order, and this order is significant. The first strategy listed is preferred to the second strategy, which is only used if the first strategy fails to generate enough recommendations. The second strategy is preferred to the third strategy, and so on.

The following table lists the various strategies from which you can choose:

Strategy Description Available for recommender types
Customer recently viewed items

Generate recommendations based on items that the customer recently viewed.

Recently viewed
Customers who bought also bought

Generate recommendations by analyzing the purchasing behavior of other customers who bought the same product.

Product to Product
Customers who viewed also viewed

Generate recommendations by analyzing the viewing behavior of other customers who viewed the same product.

Product to Product
Customers who viewed ultimately bought

Generate recommendations by analyzing the purchasing behavior of other customers who viewed the same product.

Product to Product
Product Affinity Algorithm

Generate recommendations by analyzing the product's similarity to other products.

Product to Product
Real Time Personalized Recommendations

Generate recommendations by analyzing the customer's current viewing and purchasing behavior, and by analyzing the customer's past viewing and purchasing behavior.

  • Products to Product
  • Products in a category
  • Products in all categories
Recent Most-viewed Products

Generate recommendations by analyzing which products other customers have recently viewed.

  • Products in a category
  • Products in all categories
Recent Top-selling Products

Generate recommendations by analyzing which products have been recently purchased by other customers.

  • Products in a category
  • Products in all categories

Note:

Salesforce recommends that you specify at least two strategies, so that if the first strategy fails to return enough recommendations, the system can use the second strategy. Specifying at least two strategies is considered best practice. However, the Recently viewed recommender type is an exception, as it applies only one strategy.

Rules

Rules enable you to manipulate the list of recommended product IDs before the list is passed to the storefront at run time. You can create up to 30 rules for a given recommender. Each rule specifies an action, a field, and one or more field values.

When Commerce Cloud Einstein applies a rule, it checks each product in the list of IDs returned by the strategy (or strategies), and compares the product's field value to the values specified in the rule. If the product's field value matches the specified field value in the rule―or matches one of the specified values in the rule if there are more than one―the action is applied.

Note: You are not required to define rules, and it's common for configured recommenders to dispense with rules entirely. If you specify no rules whatsoever, all of the product IDs in the list are sent to the storefront in the exact order in which the strategy (or strategies) returned them.

Rule Actions

There are four rule actions:

When you configure rules, be careful not to create conflicting rules. For example, don’t try to simultaneously show and hide the same product, and don’t try to promote and demote the same product.

Anchors for Product to product recommender types

Rules for Product to product recommender types are similar to the rules for other recommender types―specifically, each rule contains an action, a field, and one or more field values, as described above.

However, a rule for the Product to product recommender type also specifies an anchor field and an anchor field value. The system uses the anchor field and the anchor field value to conditionally apply the remainder of the rule (that is, the portion of the rule that is the same as the rules defined for other recommender types).

If the storefront customer is viewing a product, and the product contains a field that matches the anchor field and its anchor field value, then the remainder of the rule is evaluated, and the action is applied for matching items (just as rules are applied for all other recommender types).

However, if the storefront customer is viewing a product that doesn't match any configured anchor field and anchor field value, the remainder of the rule is ignored, and no action is applied.