Loading
Feature Disruption - Service Cloud VoiceRead More
Feature degradation | Gmail Email delivery failureRead More
Salesforce B2B Commerce
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Add a Sort Rule

          Add a Sort Rule

          Create a sort rule based on available products and product attributes to let customers arrange results in search and category pages for B2B Commerce stores.

          Required Editions

          View supported editions.

          Which Salesforce Commerce Product Do I Have?

          When creating a sort rule, keep these considerations in mind.

          • You can configure up to 15 sortable fields.
          • The default Best Match rule sorts output based on its relevance to the search results. Commerce Search uses the frequency of the search terms in each product and how often each term appears in the catalog to determine the sort order for the search output.
          • You can’t delete the default Best Match rule, but you change the order in which it appears in the sort menu.
          • Sort rules apply to simple products and variation child products. When your store’s results display settings are set to show parent product only, product variation can appear out of order in sorted search results. Commerce Search applies sort rules to the most relevant child product within a variation group, and search results return the variation parent product.
          • Search results are sorted numerically only if you create a custom field of the Number type on the Product page. Custom fields with the Currency type are mapped as strings rather than numbers, which can result in non-numeric sorting.
          • Sort rule IDs change each time a new sort rule is added.
          1. In the navigation sidebar, select a store from the Store dropdown.
          2. Select Settings | Search.
          3. Click Sort Rules.
          4. Click New.
          5. In the New sort option window, select the product field name to use as a sort option.
            Before sorting results by price, select a price book on the Search tile’s Additional Settings tab.
            Note
            Note You can’t delete custom fields that you use to create sorting rules. To delete a custom field, first delete the sorting rule that uses that field.
          6. Select an ascending or descending sort order.
            Values in the Sort Order Label menu change to reflect your sort order selection.
          7. (Optional) Select a sort order label to append to the sort option in the sorting menu.
            The sort order label appears in parentheses after the product field name. This label can help clarify how sorting occurs. For example, alphabetically, numerically, by cost, or by the size of a product.
          8. (Optional) Specify where the new rule appears in the sort menu.
            By default, a new sort option is added to the end of the menu. You can override this placement by changing its numerical menu position. Until a shopper or buyer selects a different rule, the sort order follows the first sort rule in the sort menu.
          9. Save your changes.
          10. On the Search Index tab, update the search index.
            Changes appear in the store after the next search index rebuild. See Update the Commerce Search Index.
           
          Loading
          Salesforce Help | Article