Skip to main content

Set Up Predictive Sort

Learning Objectives

After completing this unit, you’ll be able to:

  • Describe three ways that you can use sorting rules.
  • List three ways that you can sort search results.
  • List the data sources that predictive sort uses to calculate the affinity of an individual shopper.
  • Explain three ways to troubleshoot problems with predictive sort.

Before you set up predictive sort, let’s review Agentforce Commerce for B2C Sorting Rules. It’s important to know how sorting rules and predictive sort differ in their application and purpose.

Review Sorting Rules

Sorting rules in Agentforce Commerce for B2C are predefined configurations that determine the order in which products appear on category pages or search results. You create sorting rules for:

  • Keyword search term results
  • Searches refined by a category
  • Dynamic attributes that have a specified weighting
  • Default values for stale or undefined data
  • Keyword groups based on customer search terms
  • A dropdown for shoppers to select a sort order for search results

You configure sorting rules to align with business strategies. For example, you can prioritize products with higher margins or overstocked items.

You configure sorting rules by associating one or more static, dynamic, or blended attributes.

Attributes are data points or fields that define the characteristics of items. For example, in a product catalog, attributes can include:

  • Product price
  • Inventory levels
  • Alphabetical order
  • Custom attributes like product ratings or sales velocity

A blended attribute is a combination of multiple individual attributes, each assigned a specific weight. The weight determines the relative importance of each attribute in the blend. For example, you can assign a 70% weight to "price" and a 30% weight to "rating" to prioritize affordability while still considering customer feedback.

This approach makes for more nuanced and tailored sorting. It makes sure that search results align with business goals and customer preferences.

Though they require manual setup, sorting rules are a valuable tool that helps you optimize product presentation and guide shoppers to the products they’re looking for. You use sorting rules to implement specific business strategies on your storefront. These rules help you highlight new products, sales items, products with higher margins or your overstock. To learn more about sorting rules see, Salesforce B2C Commerce Storefront Sorting Rules.

Learn About Predictive Sort

Predictive sort uses AI to personalize the product sorting experience for each shopper. It calculates the affinity of an individual shopper to the products that they view and purchase. Data for the calculations come from these data sources.

  • Catalogs and products
  • Order history
  • Live customer clickstreams

Predictive sort uses the data sources to dynamically adjust the order of products presented during a search or browse session. Predictive sort selects relevant products and determines their order to personalize the shopper’s experience.

Key features include:

  • Real-time personalization based on browsing and purchase history.
  • Continuous learning from customer interactions to improve recommendations.
  • Integration with other Einstein capabilities, such as product recommendations.

Predictive sort saves a cookie on the shopper’s device that includes the shopper’s interest in specific products. This interest or assignment can change within a session and tracks both registered and guest shoppers. As it collects data, predictive sort learns about the shopper and personalizes the shopper’s sorting experience. For example, when a shopper looks at Men’s sneakers and then does a search, products in the Men’s top-level category display at the top.

Compare Sorting Rules to Predictive Sort

Sorting rules and predictive sort are both tools that influence how shoppers engage with products in an online storefront. While they share the goal of optimizing product presentation, their mechanisms and use cases differ.

Key Differences and Relationship

  • Configuration vs. automation: Sorting rules require manual setup and are static unless updated by a merchandiser. Predictive sort automates the process by dynamically adjusting product order based on AI-driven insights.
  • Personalization: Sorting rules apply universally to all customers, while predictive sort customizes the experience to individual users.
  • Use case: Sorting rules are ideal for implementing specific business strategies, while predictive sort is best for enhancing customer engagement and conversion through personalization.
  • Complementary use: In practice, these tools can complement each other. For example, you can use sorting rules to establish a baseline order and have predictive sort refine the presentation for individual customers.

Configure Predictive Sort

Next, explore how to modify an existing sorting rule to use predictive sort and create a new sorting rule that uses predictive sort.

Modify an Existing Sorting Rule

To help you experience predictive sort’s impact and see the before and after results, start by modifying an existing sorting rule.

Before you modify the rule, let’s see the results of using the best-matches sorting rule without predictive sort.

Best-MatchesSorting Rule Without Predictive Sort

  • Shopper search: A shopper searches for “running shoes.”
  • Sorting rule: The sorting rule uses category position, search placement, search rank, and text relevancy to identify the best-matching running shoes.
  • Results: The search results show the best-matching running shoes based on the intuition of the merchandiser, regardless of the customer's specific preferences.

Now, let’s modify the sorting rule with predictive sort.

  1. In Business Manager, click App Launcher and select Merchant Tools | Site | Search | Sorting Rules.
  2. Click the best-matches sorting rule.

Business Manager | best-matches sorting rule.

This sorting rule sorts by five attributes: Category Position, Search Placement, Search Rank, Text Relevance, and Explicit Sorting.

  1. Click Add.
  2. Start typing predictive sort until the attribute appears and then select it.
  3. Set Text Relevancy to Yes.
  4. Set Direction to Descending.
  5. Drag the new predictive sort attribute to the second position in the sorting rule.
  6. Remove search rank and search placement from the sorting rule.
  7. Click Apply.

This is the sort order of search results and how Agentforce Commerce for B2C breaks ties with the rule.

  1. Category Position
  2. Predictive Sort
  3. Text Relevance
  4. Explicit Sorting

Now, review the results of a shopper search with predictive sort applied to the best-matches sorting rule.

Best-Matches Sorting Rule with Predictive Sort

  • Shopper search: A shopper searches for “running shoes.”
  • Predictive sort: The system dynamically adjusts the product order after category position based on the shopper's behavior. In this case, favoring Brand-X running shoes with a price range of $120 to $175 during previous visits.
  • Results: The results, personalized to the shopper's preferences, show Brand-X running shoes priced between $120 and $175.

When you compare these results to the results of the sorting rule without predictive sort, you see how predictive sort personalized search results based on the shopper's previous online sessions.

Create a Sorting Rule with Predictive Sort Dynamic Attributes

Create a new predictive sort attribute that contains blended dynamic attributes.

  1. In Business Manager, click App Launcher and select Merchant Tools | Site | Search | Sorting Rules.
  2. Click Dynamic Attributes.

Business Manager | Sorting Rules - Click the Dynamic Attributes button.

  1. Click New and enter Predictive Sort as the name.
  2. Add three attributes: Revenue, Text Relevance, and Predictive Sort.

Business Manager | Sorting Rules | Create a weighted dynamic attribute.

  1. Set the weights as follows:
    • Revenue: 25%
    • Text Relevance: 40%
    • Predictive Sort: 35%
  1. Set them all to Descending.
  2. For both Revenue and predictive sort, set the default value to Minimum.
  3. For Text Relevance, set the default value to Average.
  4. Click Apply.

This new attribute, which you can use in a sorting rule, blends Revenue, Text Relevance, and Predictive Sort.

User Experience Considerations

After you test the Predictive Sort results, you can give Predictive Sort a higher weight or move it up in the sort order. If you assigned it a low weight or it isn’t high in the sort order, it’s possible that the influence on the search scores isn’t enough to affect results.

A/B Testing

To run A/B tests with sorting rules as the experience. Make sure that you turn on A/B testing in Business Manager preferences.

Here’s how you test a predictive sorting rule against a current sorting experience.

  • Use the current sort experience as the test control (80%).
  • Assign the Einstein Sorting Rule to Test Segment B (10%).
  • Phase 1a: Increase the percentage of traffic for Test Segment A & B to 25% each and run the test for 90 days, checking the progress every few weeks.
  • Phase 1b: Increase the percentage of traffic for Test Segment A & B to 45% each and run the test for another 90 days, checking the progress every few weeks.
  • Final: Deploy the winner to 100% of traffic!

Performance Considerations

Predictive sort has caching considerations for the rendering templates and search requests. Because predictive sort personalizes the search results for each shopper, caching the position of the search hits on the product grid isn't possible.

Modifying the caching setup in the rendering templates isn’t necessary. Agentforce Commerce for B2C turns off the caching of search hit positions in the results grid by default for requests that include a sorting rule with the predictive sort attribute. For example, if you assign a predictive sorting rule to the Sales category, Agentforce Commerce for B2C turns off caching for the search hit positions on the Sales category results page. If you configure an A/B test with 5% traffic to a predictive sorting rule, Agentforce Commerce for B2C turns off caching for that 5% of requests.

Troubleshoot Predictive Sort

If you suspect that your sorts aren’t working as expected, here’s how you troubleshoot.

  • Use the Storefront Toolkit to view search information and click the green information button on a product in the search results (or category grid page). If the search score for predictive sort is 0 or less, contact Customer Support.
  • Use the Recommendation Validator to check that predictive sort is working.

If you see duplicate product tiles in category search results that use predictive sort. Check that your developer added the predictive sort specific <iscache if=“${!searchModel.isPersonalizedSort()}”/> declaration to the storefront's product grid rendering templates.

Wrap It Up

In this module, you learned how to make your storefront’s search smarter with Commerce Cloud Einstein. You learned how you can use search dictionaries, search recommendations, and predictive sort to help personalize storefront search.

Resources

在 Salesforce 帮助中分享 Trailhead 反馈

我们很想听听您使用 Trailhead 的经验——您现在可以随时从 Salesforce 帮助网站访问新的反馈表单。

了解更多 继续分享反馈