Skip to main content
The Trailblazer Community will be unavailable from 12/09/2023 6:00AM PST to 12/09/2023 3:00PM PST. Please plan your activities accordingly.

Set Up Search Recommendations

Learning Objectives

After completing this unit, you’ll be able to:
  • Describe how Einstein Search Recommendations lets you personalize type-ahead search.
  • Explain the customizations you need to make to implement each Einstein Search Recommendations feature.
  • Explain how Einstein Search Recommendations improves a shopper's experience.
  • List the testing tools you can use for Einstein Search Recommendations.


As a merchandiser, Brandon Wilson wants to make sure his shoppers find exactly what they’re looking for. A great way to do this is to give them awesome search suggestions. Salesforce B2C Commerce provides out-of-the-box search suggestions on:

  • Additional phrases
  • Categories
  • Brand names
  • Products
  • Content

When a shopper selects a category or subcategory in the top or left pane, the shopper gets suggestions, spelling corrections, and completed terms specific to the category or subcategory. Brandon configures suggestions to list by group—such as category, brand, or content—which he then links to specific pages such as a category landing page or the search results from a phrase. He also shows suggestions with images, a product category, or a price.

Search Suggestions

Salesforce B2C Commerce comes with simple and enhanced search suggestions. With simple search suggestions, as the shopper types, a list of suggested terms updates with each character. If the shopper selects a suggestion, B2C Commerce uses it in the search. A hit count displays beside each term, which is how the terms sort. This is the number of products or articles found in the storefront, not product availability.

Enhanced search suggestions are enabled by default. Brandon can create additional search suggestions in Business Manager using this path: Merchant Tools > Search > Search Dictionaries > Suggestion Phrases.

Simple Versus Enhanced

Here’s the difference between simple and enhanced search suggestions.

Simple Enhanced
Categories, brands, and extra phrases.
  • Categories, brands, extra phrases, and product and content pages.
  • Search-as-you-type for products, content, categories, and brands.
Whole phrase matches. For example, B2C Commerce suggests the category “Digital Camera” when the customer starts entering the first word, “digit,” but not when the shopper starts entering the second word of the phrase, “camera.”
Matches that are independent of word position. For example, B2C Commerce suggests “Digital Camera” when the shopper enters "camera."
Hit counts are precalculated and can be outdated.
  • No hit counts.
  • Autocorrection and autocompletion of terms, for example, both terms of the input text “digit cam” autocompletes to “digital camera.”
  • All standard features, such as compound words, stop words, and sorting rules.

Simple Search Suggestions are deprecated. If you use them, you should switch to the enhanced search suggestions. Only the enhanced search suggestions work with Einstein Search Recommendations.

Einstein Search Recommendations

Einstein Search Recommendations improve a shopper’s search experience by showing the most relevant search suggestions available. With Einstein Search Recommendations, you can:

  • Lower the abandonment rate on the search results page.
  • Minimize the likelihood of zero search results.
  • Increase shopper satisfaction with storefront search.

Taking simple and enhanced search suggestions to another level, Einstein Search Recommendations lets Brandon personalize type-ahead search. Einstein applies machine learning algorithms to the internal viewSearch activities it receives from the Cloud Kicks site and from specific shopper searches. The algorithms identify the search phrases that are the most relevant to a shopper and produces recommendations.

Einstein updates search results in real-time based on the site-wide search activity for the shopper’s location and device type. For example, if the shopper types “swe” and they haven’t already searched for sweater or sweat pants, Einstein looks for phrases that start with swe for the device and location. If there’s enough data at that level, Einstein returns a phrase. If there isn’t enough data, Einstein searches across a larger data pool and devices until it finds a result.


Search Recommendations suggests products, not content. Brandon can show content using the standard content search capabilities.

Feature Versus Effort

How Brandon implements Search Recommendations depends on which feature he wants to use. Here is what he needs to do (and who he needs help from) to implement the Search Recommendations features.

Feature Customize? Level Details Role
Search term autocompletion and autocorrection No None Activate via a search preference. Merchandiser
Autosuggest of additional search phrases Yes Low Customize existing search type-ahead flyout menu to render multiple search phrase suggestions. Developer
Recent search phrases Yes Medium Customize existing search type-ahead flyout menu to retrieve and render Einstein-generated recent search phrases. Developer
Popular search phrases Yes Low Customize existing search type-ahead flyout menu to retrieve and render Einstein-generated popular search phrases. Base it on the recent search phrases. Developer

Brandon can start with the easier features that require no or a low-level of storefront customization. These can quickly improve the relevancy of his search suggestions. But he wants to implement all the features to significantly improve search suggestion relevancy to each shopper.


The implementation effort is low on popular search phrases because your developer will have already implemented recent search phrases. Both features can use similar data-retrieval and rendering logic.

Implementation Approach

Cloud Kicks already deployed Commerce Cloud Einstein. The catalog and order feed jobs are already flowing, and activity tracking is enabled. So, Brandon gets started right away with the help of his developer, Vijay Lahiri. Vijay Lahiri, developer

Here’s Brandon’s implementation approach.

  1. Enable Einstein Search Recommendations in Business Manager.
  2. Ask Vijay to extend the search suggestions display to render multiple suggestions.
  3. Ask Vijay to implement recent search phrases.
  4. Ask Vijay to implement popular search phrases.

As with any storefront customization, Brandon makes sure that his team has enough time to plan, implement, and test these features before deploying them on production.

Enable in Business Manager

Like most merchants, Cloud Kicks already enabled type-ahead search on its storefront, so enabling Search Recommendations will have an immediate effect.

Here’s how Brandon enables Search Recommendations.

  1. Open Business Manager.
  2. Select site > Merchant Tools > Search > Search Preferences.
  3. Select Enable the Einstein Search Recommendations.

    Business Manager - Search Preferences page with Einstein Search Recommendations selected

Once Linda Rosenberg, his administrator, replicates the search settings from the staging to production and development, his shoppers will start to see more personalized recommendations!

Extend the Search Suggestions Display

Brandon’s storefront already uses a type-ahead search flyout menu (expanding search box). His search flyout includes “Search for” or “Did you mean” functions directly below the search bar. All he needs to do is select Einstein Search Recommendations in Business Manager and he’s good to go.


Sites that don’t have a type-ahead search flyout must create one. Look at the Storefront Reference Architecture for examples. If you don't have “Search for” or “Did you mean” functions directly below the search bar, add the method getSearchPhraseSuggestions() to your flyout and configure it to return five phrases.

Brandon validates that Search Recommendations is working by comparing the search results for a specific three-character search before checking the box and then after checking the box and re-indexing.

Test Tools

Brandon uses a variety of tools to test his implementation.

Search Index Query Testing Tool

Brandon wants to analyze Einstein’s effect on his autocomplete and search term corrections. He can do that using the Search Index Query Testing Tool. Here's how.

  1. Open Business Manager.
  2. Select site > Merchant Tools > Search > Search Index Query Testing.

    Business Manager - Search Index Query         Testing
  3. Enter a search term: shoes.
  4. Enable autocorrections.
  5. Review the results shown by the index query testing tool and compare them to the storefront to validate experience consistency.

    Business Manager - search query testing         results

This tool documents the performance and results of the various processors that B2C Commerce storefront search uses. When you enable Search Recommendations, autocorrections made by Einstein display in the processing results.

At the bottom of the query testing tool is a list of products that match the search phrase. Above the list, there’s a “Did you mean” label that includes the search suggestions generated by Einstein. The suggestions also include what displays in the type-ahead search flyout menu. They display from highest to lowest relevance.

Business Manager - search query testing     results product list

Brandon runs a test with Search Recommendations enabled and another with it disabled, and compares the results.

A/B Test

Brandon runs A/B testing on Search Recommendations using a third-party A/B testing tool. The B2C Commerce native A/B testing tool doesn’t currently support the A/B testing of Einstein Search Recommendations.

Recommendation Validator

Brandon inspects Search Recommendations results in the Commerce Cloud Recommendations Validator.

Next Steps

Brandon learned about the B2C Commerce out-of-the-box search recommendations, both simple and advanced. Then he explored Commerce Cloud Einstein Search Recommendations, which gives his shoppers personalized recommendations based on real-time data. Next, he takes a look at Einstein Predictive Sort.


Help: Search Suggestions

Rights of ALBERT EINSTEIN are used with permission of The Hebrew University of Jerusalem. Represented exclusively by Greenlight.

Keep learning for
Sign up for an account to continue.
What’s in it for you?
  • Get personalized recommendations for your career goals
  • Practice your skills with hands-on challenges and quizzes
  • Track and share your progress with employers
  • Connect to mentorship and career opportunities