Salesforce B2C Commerce enables you to control how customers find your products on your own site and through external search engines, such as Google. The diagram below shows which features control different parts of your storefront.

In addition to search features visible in the storefront, any discussion of search must include Search Engine Optimization (SEO) and how to drive traffic to your site using external search engines.

Quick links:

A - Keyword Search

You specify what product attributes (such as product name or size) that you want to let customers search for by configuring them as searchable attributes. B2C Commerce indexes all the values for these attributes and creates dictionaries in which to look up if a particular term has a synonym, hyponym, or other term to search for with the original term. B2C Commerce makes sure that the product is online and available and then returns it in the search results.

Typing a Term into the Search Box:

These are the supported features:


B2C Commerce takes the search term entered into the search box and processes it, so that the term is correctly spelled, includes other terms, and allows for singular and plural forms of the search term to be found, along with other processing to achieve the best possible query.

You can see each step in search term processing Select site > Merchant Tools > Search > Search Index Query Testing.

Finding a Product:

Search results are identified using the following:

When a Product Can't Be Found:

Finding a Non-Product Page (a Content Asset) or a Product:

You might also want to add pages to your site to boost traffic that consists of expert advice, information on promotional events, or other kinds of content. Configurable search features that are used by keyword search for both product and content indexes include:

Search Indexing

The search index is what enables B2C Commerce to find products. Indexes must be rebuilt when products change, content assets change, or the search configuration changes in order for the site search to find the updated products or content. See also Search Indexes. If you change your search configuration and don't see the changes that you expect, the first thing to check is whether you rebuilt the appropriate indexes.

If you have multiple locales defined for your storefront, indexes are created for each locale. A locale-specific search index uses synonyms, hypernyms, stop words, compound words, and the searchable data defined for that locale. If you configure incremental indexing or scheduled automatic reindexing for an index, that configuration applies to all locales.

Back to Top.

B - Search Results and Sorting Rules

The order in which search results are returned depends on the sorting rule applied.
  • Results from keyword search: The keyword search sorting rule is applied. This is the sorting rule configured for the catalog root category.
  • Results from navigating to a category page: The sorting rule for the category is applied.

To troubleshoot the position of search results based on sorting rules, see Using the Search Information Tool.

After the search results are returned, users on the site can resort the result using the Storefront sorting rules.

Active Data and Dynamic Sorting

You can create sorting rules that use information, such as low inventory or high profit margin, to automatically push items higher or lower in the search results, to let you maximize your profit and the site experience of your customer.

How Product Variations Appear

You can control whether products with variations, such as a shirt that comes in different colors, are shown in the search results.

For example, you can show a product with variations as:

  • A single product in the search results that allows variation selection in the product detail page. For a shirt, you would see one result with a shirt image.
  • A single product in the search results with swatches. The swatches can show different images when selected. For a shirt, you would see one result with a shirt image and several color swatches below it.
  • Multiple products with different variation images. These products might have swatches, but usually do not.

You control this by selecting a slicing attribute. For more information, see Variation Product Display and Master and Variation Product Scenarios.

Whether Unavailable Products Display

You can control whether unavailable products appear or are pushed to the bottom of search results.

Whether they appear at all is controlled in the product attribute, Searchable If Unavailable.

If you want them to appear, but be pushed to the end of the search results, you can use sorting rules to control their placement. See Active Merchandising Scenarios.

Back to Top.

C - Site Navigation

Category navigation links return pages with results from a category search. You can also create navigation links that launch cross-category searches, such as Clearance or Exclusive items, provided data exists to identify such products.

Back to Top.

D - Storefront Sorting Rules

A storefront sorting option is selected by customers to sort search results already returned by a category or keyword search. Any storefront sorting options you configure appear in the Sort By dropdown list at the top of search results. All storefront sorting options are available site-wide. See Creating Storefront Sorting Options.

Back to Top.

E - Search Refinement

See also Search Refinement

Back to Top.

Search Engine Optimization (SEO)

You can influence how external search engines, such as Google and Yahoo, rank your site pages in their search results. See also Search Engine Optimization (SEO) Overview

Next steps: checklist of search tasks.

Back to Top.

Related Links

Brand Synonyms

Search Terms Containing Numbers and Special Characters