Newer Version Available
Sort Rule Input
- Root XML tag
- <sortRule>
- JSON example
-
1{ 2 "type" : "ProductBased", 3 "sortStandardField" : "Stock_Keeping_Unit", 4 "direction" : "Ascending", 5 "labelSuffix: "Asc", 6 "sortOrder" : "1" 7} - Properties
-
Name Type Description Required or Optional Available Version type String Type of sort rule. Values are: - Custom—Custom field or non-product object sort rule.
- ProductAttributeBased—
- ProductBased—Product sort rule.
- Relevancy—Relevancy sort rule.
Required 54.0 sortStandardField String A standard field typically used for sorting (for example, Name, Stock_Keeping_Unit, Created_Date). You must specify a standard sort field or a custom field ID, but not both. 54.0 customFieldId String A custom field to use for sorting. You must specify a custom field ID or a standard sort field, but not both. 54.0 direction String Direction of the sort rule. Values are: - Ascending—Sorts in ascending alphanumeric order (A–Z, 0–9).
- Default—If there isn’t an ascending or descending direction, sorts in default order. For example, sorting by relevancy.
- Descending—Sorts in descending alphanumeric order (Z–A, 9–0).
Optional 54.0 labelSuffix String Label suffix of the sort rule. Valid values: - Ascen—Label suffix for 'Asc'
- Ascending—Label suffix for 'Ascending'
- Az—Label suffix for 'A-Z'
- Descen—Label suffix for 'Desc'
- Descending—Label suffix for 'Descending'
- FewMany—Label suffix for 'Few-Many'
- HeavyLight—Label suffix for 'Heavy-Light'
- HighLow—Label suffix for 'High-Low'
- HighestLowest—Label suffix for 'Highest-Lowest'
- LightHeavy—Label suffix for 'Light-Heavy'
- LowHigh—Label suffix for 'Low-High'
- LowestHighest—Label suffix for 'Lowest-Highest'
- ManyFew—Label suffix for 'Many-Few'
- NewOld—Label suffix for 'New-Old'
- Newest—Label suffix for 'Newest'
- NewestOldest—Label suffix for 'Newest-Oldest'
- NineZero—Label suffix for '9-0'
- OldNew—Label suffix for 'Old-New'
- Oldest—Label suffix for 'Oldest'
- OldestNewest—Label suffix for 'Oldest-Newest'
- PriceDecreasing—Label suffix for '$$-$'
- PriceIncreasing—Label suffix for '$-$$'
- ThickThin—Label suffix for 'Thick-Thin'
- ThinThick—Label suffix for 'Thin-Thick'
- Za—Label suffix for 'Z-A'
- ZeroNine—Label suffix for '0-9'
Optional 54.0 sortOrder Integer Sort order for the rule. A lower number has higher precedence. Required 54.0