Sorting Dynamic Navigations
Navigation sorting comes in 2 types:
- Sorting the navigations (e.g. which comes first - the panel of
Color
orBrand
) - Sorting the values (e.g. which comes first - refinement for
Red
orBlue
)
Which Navigations Will Be Returned
The search response will return the top 50 navigations, by using the navigations that had available values returned, in this order:
- Order in which they were defined in Command Center
- Order defined in the bulk upload, when the precedence rules match
- Bulk upload without precedence rules
Sorting Navigations
Manually for the Area
You can create an Area wide default, by managing the navigations in the in the Dynamic Navigation panel.
The order is set by using the ‘Move this Navigation’ option as shown here:
Once the order has been updated, you will see a green message that the new order has been saved.
Manually for a Specific Condition
You can use the Rule interface to define which navigations should show up, and the order that they should be shown in. In order to do this, all navigations must be already defined for the Area.
Within the Rule interface, you will need to enter all the navigations that you want to show up given the Triggers setup by you.
In this example, you see us adding Gender and Size by using their exact JSON addresses:
Once we added the navigations, we have drag-and-dropped the navigations into the desired order.
This order will be used with the rule.
Manually via the Bulk Upload
If you Bulk Upload your navigations, they will not be visible in Command Center.
In this case, you will need to use the configuration file of the Bulk Upload to set the order of the navigations.
Automatically by Popularity
You can use the Recommendations API to sort the navigations by how popular they were. You can specify filters like duration (popular in the last week or month), region (to make the order geospecific), and other custom filters.
Please see the Recommendations API for more details.
Which Values Will Be Returned
The top 20 values are returned, unless you are looking at the Dynamic Navigation when there are guaranteed 25 ranges returned. The top 20 values are defined by the Sort Order in Command Center.
Additional values can be fetched with the Refinements API.
Sorting the Values
Sorting by Count or Value
They are 4 ways that you can sort Values via Command Center:
Sort | Impact |
---|---|
Count Ascending | Will use the count of the available records as sort, smallest first. E.g. “Red: 1” will come before “Blue: 10” |
Count Descending | Will use the count of the available records as sort, largest first. E.g. “Blue: 10” will come before “Red: 1” |
Value Ascending | Will use the title of the available records as sort, A-Z. E.g. “Blue: 10” will come before “Red: 1”. |
Value Descending | Will use the title of the available records as sort, Z-A. E.g. “Red: 1” will come before “Blue: 10” |
You can change the sort via this dropdown:
Automatically by Popularity
You can use the Recommendations API to sort the values by how popular they were. You can specify filters like duration (popular in the last week or month), region (to make the order geo-specific), and other custom filters.
Please see the Recommendations API for more details.
Manually by Navigation
If you wish to manually sort the values, you will need to pass a custom sort via the Dynamic Navigation Metadata. E.g.:
This custom sort order will need to be parsed out and interpreted by your front-end into the correct rank of values.
Sample Business Logic to Integrate
This is a list of best-practices business requirements to discuss with your business and technical teams for implementing dynamic navigation:
Requirement | Action |
---|---|
Never show some navigations | Exclude at query time with excludeNavigations |
Sometimes not show some navigations? | Ask the business to tag the navs to hide with a key-value setting within Command Center, such as key: display - value:false . Look for this value to be absent or true before rendering. |
Pin some navs to the top? | Ask the business to tag the navs to pin with a key-value setting within Command Center, such as key: location - value:1 . Look for this value to drive the rank of the navigation for rendering. |
Pin some values to the top? | Ask the business to tag the values to pin with a key-value setting within Command Center, where the key will the value to pin. For example to pin Blue to the top of colors, ask them to add the metadata of key: Blue - value: 1 . Look for this value to drive the order of refinements for rendering. |
Other requirement that requires merchandiser decision | Design around the same pattern of key-value s |