Building a sorting rule: attributes, direction and text relevancy
Key Takeaway
Attribute order is priority order. The first attribute sorts every product, and each later attribute only breaks ties. Products with no value for a sort attribute go last, whichever direction you choose.
A sorting rule controls the order in which products appear in storefront search results and on category pages, so merchants can bring chosen products to the top. You build a rule in Business Manager as an ordered list of attributes. For each attribute, you pick a sort direction and, where it applies, whether to combine it with text relevancy.
How to create a sorting rule
You create a sorting rule in Business Manager, on a page with three sections: "Sorting Rules", "Attributes", and "Preview".
- Go to site > Merchant Tools > Search > Sorting Rules and click "New".
- Enter a unique rule ID and a description. The description is the name you see when you pick sorting rules for categories and storefront options.
- Choose the rule's context: site-specific or global.
- In the Attributes section, click "Add" to add an attribute. Repeat for each attribute the rule needs.
- For each attribute, set the "Direction" column and, where it applies, the "Text Relevancy" column.
- Click "Apply" to save the rule, or click "Cancel" to revert to the last saved value.
- In the Preview section, select a category, enter a search term, and click "Preview" to see the sorted results before you use the rule on the storefront.