Salesforce B2C Commerce 19.2 > Merchandising Your Site > Search > Sorting Rules > Create Sorting Rules

Sort by Keyword Groups

Sorting rules can also be assigned to keyword groups, which allow you to define extra sorting rules based on customer search terms.

For example, a search containing the term "inexpensive" can cause results to be sorted from lowest to highest price regardless of the category the search is executed in.
Note: The default sorting rule is assigned to all keyword searches, but is overridden by extra keyword-specific sorting rules.

Terms within Keyword Groups are matched in the following order:

  1. Full matches over partial matches.
  2. Exact matches over wildcard matches.
  3. First match from left to right in the search string.

Conflicting keyword groups are applied in chronological order, from newest to oldest.

Keyword Sorting Groups are created, edited, and deleted within Search Dictionaries.

Also, keyword groups can be imported and exported using the search settings ImpEx module, and the assignments can be imported and exported using the sorting rule ImpEx module.

  1. To assign keyword-group-specific sorting rules, select site > Merchant Tools > Search > Sorting Rules - Keyword Search.
  2. Under Search Keyword Groups, choose the correct locale and click the Search icon.
    Assigned results display in the search results. Any unassigned results are in the New Assignment section dropdown.
  3. Under New Assignment, select an unassigned Keyword Group.
  4. Select a rule.
  5. Click Apply.