Skip to main content

Configure Storefront Search Redirects

Learning Objectives

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

  • Explain how guided search gives you control over what the shopper sees.
  • Explain how search redirects work behind the scenes.
  • Explain how matching works for search redirects.
  • Describe how the locale fallback mechanism works for search redirects.

What About Search Redirects?

Search redirects provide Brandon Wilson, Cloud Kicks merchandiser, with guided search control over what the shopper sees. When shoppers enter a search term, he can direct them to a particular page or URL, which enhances their buying experience and increases the likelihood that they’ll buy something. When they search for sneakers, for example, the redirect returns the Special High-End Jazzy Sneaker page, showing an athlete wearing those sneakers in a road race. Very exciting, and more importantly, just what the shopper was looking for!

Athlete running a race

What’s even better is that each search redirect can be triggered by multiple, comma-separated keywords. That’s a lot of control!

How Search Redirects Work

Behind the scenes, Salesforce B2C Commerce uses the SearchRedirectURL pipelet to integrate redirect evaluation into the storefront search flow. A pipelet is a B2C Commerce code snippet that performs a specific business function, in this case a URL redirect.

Within a B2C Commerce storefront application, a developer places the SearchRedirectURL pipelet before the Search pipelet to ensure that processing bypasses the standard search function if the shopper enters a redirect keyword.

If the term that a shopper enters matches a search redirect, the SearchRedirectURL pipelet calculates the fully qualified target URL based on the configured redirect action. An ISML template (software component that processes what displays on the browser) uses the calculated URL to issue the actual HTTP redirect to the client browser. 

Note

For URL redirects, you can configure HTTP and HTTPS for the destination protocol.

Make a Match

Brandon configured search redirect preferences in the last unit. When he disables the search redirect preference setting, B2C Commerce processes keywords using the exact match type. When he enables the setting, B2C Commerce processes keywords using the exact match, phrase match, broad match, and negative match types. He wants to use them all. So let’s find out how they work.

Exact Match

For a keyword phrase enclosed in brackets, as in [mens shoes], the redirect rule triggers when the shopper enters the specific phrase, for example mens shoes. The phrase must be in that order, with no other words entered, and no variations. For example, mens shoe does not trigger the rule.

Here are some other examples.

Search Keywords

B2C Commerce finds this...

It doesn’t find this...

[red shoes]

red shoes

red kids shoes

Red kid’s shoes

[sandal]

sandal

red sandal

kids sandal

sandals

Note

Enter search keywords in the Business Manager Search Driven Redirects module.

Phrase Match

When the keyword phrase is enclosed in quotation marks, such as “mens shoes”, the redirect rule triggers when the customer enters mens shoes, with the words in that specific order. It also triggers when the shopper enters other text as long as what they enter includes the exact phrase specified.

Here are some examples.

Search Keyword

B2C Commerce finds this...

It doesn’t find this...

“red shoes”

womens red shoes

red kids shoes

mens large red shoes

shoes womens

kids shoes

men's shoes

“sandals”

sandals

red sandals

mens sandals

sandal

sandale

Broad Match

When the keyword phrase contains mens shoes, with no quotation marks, the rule triggers when the shopper enters text that includes the words mens and shoes in any order. The rule also triggers for both singular or plural forms based on stemming for the specific language involved. It doesn’t consider synonyms or other variations.

Here are some examples.

Search Keyword

B2C Commerce finds this...

It doesn’t find this...

red shoes

mens red large shoes

cheap red kids shoes

buy red shoes

mens

shoes

cheap shoes

sandal

sandals

red sandals

sandales

red

mens

Negative Match

When the keyword phrase is prefixed with a hyphen, the rule does not trigger for a search that contains those terms. Negative keywords must be used with at least one positive keyword. A search redirect that only contains negative keywords won’t be triggered for any keyword. For example, the keywords mens shoes, -used triggers search redirects for mens shoes and cheap shoes for men, but not used shoes.

Here are some examples.

Search Keyword

B2C Commerce finds this...

It doesn’t find this...

mens shoes, -used, -“running shoes” -basketball shoes

mens shoes

shoes running

buy mens shoes

mens used shoes

running shoes men

mens basketball shoes

-shoes

none

any

Configure Search Redirects

Brandon is now ready to configure search redirects. Here’s how he does it.

  1. Open Business Manager.
  2. Select site > Merchant Tools > Search > Search Driven Redirects.
    In Business Manager, create and edit search-driven redirects.
  3. Click New.
    In Business Manager, configure a new search redirect.
  4. The Default language is already selected. (If you want to work with another language, select the language and click Apply.)
  5. Enter one or more words, separated by commas, that you expect the shopper to enter for a search: womens shoes, -used
  6. Select Online for the redirect to be used by the B2C Commerce storefront application.
  7. Select Secure to use https for the destination protocol. Otherwise, the application uses http. (If Enforce HTTPS is enabled for the site, it uses HTTPS anyway.)
  8. Select the action that you want the redirect to take when a shopper enters the keyword in the search field: Show Category Page
  9. Select the Category ID: womens-shoes
  10. Click Apply.

Localization

Brandon wants to specify certain keywords by locale for each search redirect. The locales that don't have keywords use the keywords provided via the fallback mechanism. That means that if a search redirect doesn’t have a keyword defined for a specific locale, the locale fallback mechanism applies. However, locale fallback in the Search Dictionaries module only works from country locale to language locale, such as en_GB to en. Search Dictionaries does not support fallback from language to the default locale.

Take a look at this table for some examples. 

Locale

Keywords

de_DE

Männerschuhe, Damenschuhe, -gebraucht 

de_AT


de

schuh

es_ES

“Zapatos de los hombres”, “Zapatos de mujer:”, -utilizado

es

 zapatos

When a shopper searches using the de_AT locale, B2C Commerce uses the de locale keywords. This is because de_AT defaults to de. 

Here’s the fallback mechanism.

locale > country locale

de_AT > de

de_DE > de

When a shopper searches with the es_ES locale, B2C Commerce uses the es_ES keywords and no fallback. The es_ES locale use the default keywords: “Zapatos de los hombres”, “Zapatos de mujer”, -utilizado

Here’s the fallback mechanism.

Locale > country locale

es_ES > es

Next Steps

In this unit, you learned how guided search gives you control over what the shopper sees, how matching works for search redirects, and how locale fallback works for search redirects. Next, you learn about searchable product attributes.

Resources

Keep learning for
free!
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