Skip to main content
Build the future with Agentforce at TDX in San Francisco or on Salesforce+ on March 5–6. Register now.

Make Your Store Searchable

Learning Objectives

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

  • List the steps you need to take to configure search.
  • List the access settings that let shoppers shop.
  • Explain how to control store search behavior.
  • Describe how to make products and product fields searchable.
  • List the actions that require a search index rebuild.

Merchandise Your D2C Commerce Store

Online shoppers are used to fast and easy search and checkout, regardless of the device they use. B2B Commerce buyers are already fluent in the B2C world, and come with high expectations for an awesome experience.

Taylor Givens (they/them), the Ursa Major Solar senior merchandiser, is eager to create this experience with their company’s new direct-to-consumer (D2C) solar products store.

Taylor Givens, Ursa Major Solar senior merchandiser

Here’s Taylor’s general checklist of what they’d like to do.


Task

1

Optimize the store’s searchability to get shoppers to the products they crave.

2

Deploy and manage Commerce Einstein to personalize the shopper experience.

3

Brand and update the store’s template with Experience Builder to keep the experience fresh. 

In this unit, you learn how to configure and manage search as Taylor goes through their checklist.

Taylor asks the question, “So what is D2C Commerce search all about?” The answer seems fairly simple. It’s about what happens when the shopper searches for a product in the store. But what's behind the search?  How do products become available for search? How do you ensure shoppers can access products?

Let's start by exploring what happens when a shopper enters text into the search field. D2C Commerce does a match based on stemming, as in word stem matches. For example, panel finds panels and jazz returns jazzy. In addition, D2C Commerce returns search results only when there’s a full token match—when all search terms are present in a result. Partial token matches, such as prefix and infix (an element inserted in a word) searches, are not supported.

Taylor uses this checklist to answer their other questions.


Task

1

Get product data ready.

2

Give shoppers access.

3

Control store behavior.

4

Mark products and product fields as searchable.

5

Add facets (filters).

6

Define search results display.

7

Rebuild the search index to include the latest changes.

This is all about searching within a store. Taylor also needs to consider searches from outside the store, such as from a Google search. Take a look at the Search Basics for Experience Builder Sites Trailhead module for some ideas. 

Get Product Data Ready

Taylor reviews how other store features and Salesforce org features and settings might affect whether a product is discoverable. The product data, for example, whether imported or created manually, must be ready for showtime.

  • All products in the store must be associated with a category.
  • All categories must be associated with the store catalog.
  • The catalog must be associated with the store.
  • Shoppers must be able to access product data.

Give Shoppers Access

Giving shoppers access to product data is essential. Before a shopper can search for a product, they must have access in these ways.

Access setting

Description

Create, read, update, and delete (CRUD) read access to the product and catalog

CRUD settings are applied at the profile and permission set level. 

Entitlement to view the product

Entitlements are units of Salesforce customer support.

Field-level security (FLS) access to product fields configured for search 

FLS lets you control access to the information in object fields through profiles, permission sets, or from the field itself. Using FLS to restrict a shopper’s access to a field that’s searchable or filterable prevents that shopper from conducting a search.

Access to indexed fields

Whether you index one or many product fields, if a shopper can’t access one indexed field, they can’t search your store.

Control Store Behavior

Taylor wants to learn how to control store search behavior. This means the Product2 data object, which serves as a template for store products. You can use it to control search, facet, and display behavior.

The standard and custom field types have characteristics that let you control search, facet, and display behavior, as follows.

Controlling this behavior

Affects

Search

Whether you can make an entity discoverable in search

Facet

Whether you can use an entity as a search filter

Display

Whether you can show or hide and entity

Here are some of the standard fields that let you control behavior.

Field name

Label

Controllable behavior



Search

Facet

Display

CurrencyIsoCode

Product Currency

Description

Product Description


DisplayUrl

Display URL


Name

Product Name


See the documentation for details.

Mark Products and Product Fields as Searchable

Whether a product is active or searchable are two different settings.

  • Active means the shopper can see it in the store. The Active column on a product’s detail page in the catalog tells you if shoppers can see the product in the store.
  • Searchable means the product can display as the result of a search. To prevent a product from being returned in a search, mark it as not searchable.

After Taylor builds the initial search index, all products in a catalog are searchable by default. You can exclude products from search so they aren’t returned in search results, though shoppers can still see them. Here’s how to do it.

  1. Open the Commerce App and select Product Workspace.
  2. Click an individual product name.
  3. On the product detail page, click the product’s Stores tab.
  4. Click the row actions menu icon.
  5. Click Mark as Not Searchable.

Product fields are the same from product to product. A product can have up to 50 searchable fields or other attributes. More than that interferes with the next search index rebuild. Each product has a field for Product Name, Product Description, and Product SKU, which are searchable by default. Use these fields or add custom searchable fields to improve shopper search. Here’s how to do it.

  1. From the Commerce app, open your store’s home page.
  2. Click the Search tile.
  3. Click Searchable Fields.
  4. Click Manage Searchable Fields.
  5. In the Manage Searchable Fields window, click the plus sign to mark a field as searchable.
  6. Click Save.
  7. Rebuild the search index.

Add Facets

Shoppers use facets to narrow their search results. For example, Taylor wants to use the facet values panel type, panel color, and monthly output (kWh). When a facet has values, they appear on the results page under their parent facets automatically. Product Category is the only field that’s there by default. You can’t remove it. Shoppers can select one or more facets as they search for products.

Here’s how to create facets.

  1. From your store's home page, click the Search tile.
  2. In the left column, click Results Filters.
  3. Click the Manage Filters button.
  4. Move the product fields you want to use from the Available Fields column to the Selected Fields column.
  5. To arrange the display order of the facets, select a field in the right column, and use the up and down arrows to position it.
  6. Click Save.

Define Search Results Display Settings

Taylor now wants to define how many values appear for each search facet, and how many items appear on each search results page before the shopper needs to click Next. Here’s how to do it.

  1. On your store’s home page, click the Search tile.
  2. Click Results Display Settings.
  3. In the Maximum Values per Filter field, enter the maximum number of search results values that you want to appear for any filter: 50
  4. In the Results per Page field, enter the maximum number of search items that appear on a page before the shopper must click to view the next page of results: 20
  5. Click Save.
  6. Rebuild the search index.

You can also select if you want to group a product’s variations under its parent product on the search page or show each variation separately.

Build or Rebuild the Search Index

Building and rebuilding the search index use the same process. Always rebuild after changes so shoppers see the latest. A small catalog with a few products takes minutes to build; a large catalog takes longer. Taylor builds the search index before activating the store, and rebuilds it after making these changes. 

  • Update which product or product attribute fields are marked as searchable or filterable.
  • Update the values of any product fields that are marked as searchable or filterable.
  • Update products in the store’s catalog.
  • Change the category hierarchy structure, or add or remove categories.
  • Update category names.
  • Add or update the products in an entitlement policy.
  • Change the geolocation of your organization.
  • Remove or change the name of a custom field on the Product2 object.

Here’s how to rebuild the search index.

  1. From your store’s home page, click the Search tile.
  2. Click Search Index Summary.
  3. Click Rebuild Index.

For search to work properly when Taylor changes the name of a custom field or removes one, they must follow these steps.

  1. Before renaming or removing, mark the custom field as unsearchable.
  2. Remove the field.
    • Rebuild the search index now if you are only removing the field.
  3. Create a custom field with the updated name and mark it as searchable.
  4. Rebuild the search index.

Next Steps

In this unit, you learned how to set up and manage D2C Commerce search to help shoppers easily find what they’re looking for. Next, learn how to deploy and manage Commerce Einstein.

Resources

Compartilhe seu feedback do Trailhead usando a Ajuda do Salesforce.

Queremos saber sobre sua experiência com o Trailhead. Agora você pode acessar o novo formulário de feedback, a qualquer momento, no site Ajuda do Salesforce.

Saiba mais Continue compartilhando feedback