Skip to content
Log in

How storefront search works

On this page

Use this article to understand how a shopper’s search on your storefront is matched and ranked, and what you can change to improve the results they get. It covers products, articles, and pages.

Shoppers search in two places:

  • Global search in the store header, which searches all products, articles, and pages at once.
  • Listing pages, such as a product category, where they can filter and sort the products shown.

How matching works

StoreConnect uses a full-text search engine. It behaves in these ways:

  • Search word normalization - Search detects a normalized version of a word, rather than the exact word. For example, “nutrition” will find results containing “nutritional” or “nutritionist”. But it will not find results only containing “dietary” or “health food” which do not contain the search term.

  • Ignores very common words - such as “and”, “the”, “is”, etc, from the search query.

    For example, searching for “the apple pie” will return the same results as searching for “apple pie”.

  • Case insensitive search - Searching for “apple pie” will return the same results as searching for “Apple Pie”.

  • Quotation marks for exact phrases - For example, searching for "apple pie" (including the quotes) will only return results containing the exact phrase “apple pie”, but not “apple tart and pie”.

What fields are searched?

Product searches look for

  • Display Name / Name
  • Search Keywords
  • Product Code
  • Slug (the URL-friendly version of the product name)
  • Variant titles (e.g., “Small”, “Red”, “Large”)
  • Variant product codes
  • Variant search keywords

Product search results pages will show master products, though the search results might be matching one or more variants.

Article searches look for

  • Title
  • Search Keywords
  • Meta Title
  • Meta Description
  • Meta Keywords
  • Body, Introduction, and Summary (rendered as plain text for a guest user)
  • Content Blocks (rendered as plain text for a guest user)

Text in Body, Introduction, Summary, and Content Blocks that contain Liquid syntax, might display different text to different users. The search engine indexes the rendered text for a guest user only. So a logged in user might not be able to search for text that is only visible to them.

Content page searches look for

  • Title
  • Search Keywords
  • Meta Title
  • Meta Keywords
  • Meta Description
  • Body (rendered as plain text for a guest user)

The search engine indexes the rendered text for a guest user only, so a logged in user might not be able to search for text that is only visible to them.

Add search keywords

Search Keywords (s_c__Search_Keywords__c) is a long text field on Products, Pages, and Articles. Terms you put there are indexed by on-site search but never shown to customers, so use it to catch the words shoppers actually type when they differ from your own.

Keywords rank above body text: the title or name carries the highest weight, then search keywords (alongside product code, slug, and meta title), then body content. Matching is case-insensitive and stemmed, so wrench also finds wrenches.

Good candidates:

  • Synonyms and alternative names — “sofa” and “couch” for a product listed as “settee”.
  • Regional spellings — “jewellery” for a product named with “jewelry”.
  • Common misspellings — the versions customers actually type.
  • Abbreviations and short codes — “SKI-JKT” for “Ski Jacket”.
  • Category or theme terms — “gift”, “birthday present”, or “stocking stuffer” on seasonal products.

Add keywords to a record

  1. Open the Product, Page, or Article you want to make easier to find.
  2. In the Search Keywords field, enter each keyword or phrase on its own line. Commas work too, but one per line is the field’s own convention. The field holds up to 1,024 characters.
  3. Select Save.

If the field is not on your page layout, add it. See Change page layouts for Salesforce objects.

After the search index next refreshes (every 3 hours), search your storefront for one of the keywords. The record appears in the results even though the keyword is in neither its name nor its description. See Refresh the search index to bring that forward.

Example

A hardware store sells tools that go by different names depending on who is buying. The product is labeled “Allen Key Set”, but customers also call it a hex key or an Allen wrench, and some misspell it. Its Search Keywords field holds:

```text

hex key hex wrench bike tool Alan Key Alan Wrench flatpack furniture tool ```

A multi-word keyword is indexed as its separate words, so bike tool also helps a shopper who searches for tool. Only a shopper who types the phrase in quotes is held to the exact phrase.

For products with variants, each variant has its own Search Keywords field. Variant keywords are indexed against the master product, at a lower weight than the master’s own keywords.

Filter products in global search results

StoreConnect limits the available filtering options in the global search results to “On Sale” and “In Stock” statuses, as well as by price range (currency or points).

Filter products in a category

StoreConnect allows you to filter products in a category by traits, tags, and brands. This is in addition to the “On Sale” and “In Stock” statuses, as well as by price range (currency or points).

Traits

StoreConnect allows you to mark Categories (or Taxons) with Traits, using the Trait, Trait Value, Trait Type, and Trait Category objects.

When viewing a category, the sidebar will display all possible traits for the products in that category. Customers can filter products by selecting one or more trait values.

Categories (Taxons) can have children categories, and the traits of the parent category will be inherited by the child categories. This allows you to set up a hierarchy of traits that can be used to filter products.

For example, if you have categories like “Clothing” and a child category “Footwear”, and “Clothing” has a trait “Size” with values “Small”, “Medium”, and “Large”, then the “Footwear” category will also have the “Size” trait with the same trait options.

If Traits are not configured for a category, the Traits filter will not show.

Tags

StoreConnect allows you to mark Products with Tags, using the Tag and ProductTag objects.

When viewing a category, the sidebar will display all possible tags for the products in that category. Customers can filter products by selecting one or more tags.

If no Tags are associated with the products in the category, the Tags filter will not be displayed.

Brands

StoreConnect allows you to

  • mark Accounts as Brands by checking the “Is Brand” checkbox in an Account object page. These Accounts will be available as Brands in the Product object page.
  • associate each Product with an Account as its brand by selecting the Brand in the Product object pages
  • filter products by Brands within a category search results page.

If no Brands are associated with the products in a category, the Brands filter won’t show.

Refresh the search index

The StoreConnect search system is optimized for customer search performance, rather than for changes to the store. The search index is updated periodically, and changes to products, content articles, and content pages might not be immediately reflected in search results.

Different aspects of the search system are refreshed on different schedules:

  • The liquid content of Content Articles and Content Pages is converted into plain text, as if viewed by a guest user, once per day.
  • The remainder of the search index is refreshed every 3 hours.

Follow this process to trigger an index refresh in your Salesforce org.

Was this article helpful?

Was this article helpful?