Implement personalized sorting rules within your storefront.
-
Go to .
The Sorting Rules page opens with the Sorting Rules tab
open. On this tab, you create or edit your sorting
rules.
-
To create a new sorting rule, click
New.
The page has three sections: Sorting Rules, Attributes, and
Preview.
A new sorting rule appears with the default rule ID
highlighted.
-
Enter a unique rule ID and description.
You use the description to identify the rule when selecting sorting rules for
categories and storefront options.
-
Choose whether you want the context of the rule to be site-specific, or globally
applied.
Selecting “global” makes the sorting rule usable in all sites.
-
To add an attribute for your rule, click Add in the Attributes
section.
-
Enter the attribute to sort by or select an attribute from the
list. You can select the following types of attributes:
-
Standard attributes: Standard attributes enable you
to intervene in sorting using explicit placement of search results
for categories, based on specific attributes intended for search
ranking or availability.
-
Product attributes: You can select any single-value
(non-set) attribute of the product system object to use in a sorting rule, as long
as it is not a Password, Image, Text, HTML, or Email type of attribute. Product
attributes don't have to be flagged as online or searchable to be used in sorting
rules.
-
Active Data attributes: These attributes require the
active merchandising feature to be implemented for the attribute
data to be useful in sorting. These attributes include data
collected from orders on your production system and information
collected from storefront pages.
-
Availability model attributes: These attributes
require the availability, active merchandising, or both features to
be implemented for the attribute data to be useful in
sorting.
-
Dynamic attributes: Dynamic attributes are custom
combinations of attributes created by the merchant.
All system attributes are listed as Name (type.ID
). All custom attributes are
listed as Name (type.custom.ID
). Because it's possible to have multiple
attributes with the same name, check to make sure that you are selecting the correct
attribute type and ID in addition to the correct name.
Note: If you create a custom enum attribute with a default value selected, the
attribute is not set to that value for all products automatically. Therefore,
sorting rules do not take this default value into account unless you have set an
explicit value for that attribute.
-
In the Text Relevancy column, click in the cell for your
attribute and select whether you want to use text relevancy in
combination with the attribute, using one of the following
options:
-
Yes: The text relevance score (from 0 through 1) is
multiplied by the score of the attribute selected for the rule. This is the equivalent
of a 50%-50% weighting between the selected attribute and the text relevance score. This
is appropriate when there are multiple items that might have the same score from the
sorting attribute, such as a recommendations sort, or when it's not readily apparent to
the user that more than just the selected attribute is being used for sorting, such as a
sorting for best-selling items. For example, if you have a sorting rule that sorts by a
1–5 star customer rating, selecting Yes for text relevancy is
identical to selecting the Text Relevance standard attribute to directly follow the
review rating attribute in the sorting rule. Because you can't use the Text Relevance
standard attribute twice in the same rule and have a limited number of sorting
attributes in a rule, which is useful.
-
No: Only the score for the attribute selected for the
rule is used. This is appropriate when it's unlikely that multiple
items have the same score or when the customer expects the results
to be sorted only by the selected attribute.
-
N/A: Displays if the selected attribute can't use
text relevancy.
-
In the Direction column, click in the cell for your
attribute and select the direction of the sort. Some attributes do not
let you select direction, because it's implied by the attribute.
For example, Category Position automatically sorts items in ascending
order.
- Ascending: Sorts the results from top to bottom in the search results from the
lowest value to the highest (A-Z, 1–100).
- Descending: Sorts the results from top to bottom in
the search results from the highest value to the lowest (Z-A,
100-1).
-
Add any additional attributes and configure them.
-
To save your rule, click Apply.
If you change a sorting rule and want to revert to the last saved value, click
Cancel
-
Preview the results of your new sorting rule in the Preview section.