Working with product sorting¶
The sort order of products in Voyado Elevate 3 can be based on a variety of things. By default, the sort order of a product list is by relevance according to Elevate, relevance
. The sort_by
argument can be included in a panel query to specify another sort order.
The type of sorting used should be aligned with the purpose of the panel used. An example of this is a panel that showcases new products. A relevant sorting for this panel can be based on a product attribute with the release date in descending order. Sort attributes for specific products attributes can be configured in the Voyado Elevate manager.
Sorting modifiers¶
Sorting modifiers asc
and desc
can be included in a sort_by
argument to sort the data ascending or descending. If a sorting modifier is not included in an argument, the default modifier of the sorting type will be used.
It is not recommended to use a sorting modifier when sorting by relevance
, personal
, sales
, or clicks
. These sort orders default to desc
. Using asc
as a sorting modifier with these sort orders may produce unexpected results.
Sort by relevance¶
The sort order relevance
is the default sorting type if the sort_by
argument is not included in a panel query. Relevance of a specific product is based on context and will differ based on what panel or search phrase is used.
The relevance is calculated by Elevate using parameters such as product information, strategy score, and customer history.
The default sorting modifier for relevance
is desc
. It is not recommended to include a sorting modifier when sorting by relevance
. Products in some panels sorted by relevance
are affected by exposure strategies, boost, and bury.
Example arguments¶
sort_by: relevance
Sort by product attribute¶
Any product attribute can be used for sorting of products if a sort attribute has been configured for it. This attribute is then used in the argument sort_by
. When sorting by product attribute, the result set can contain a maximum of 100 000 variants.
The default sorting modifier for a product attribute is asc
. It is recommended to include a sorting modifier when sorting by a product attribute.
Example arguments¶
sort_by: release_date desc
sort_by: price asc
Sort by personal¶
The personal
sort order tries to find products that can be associated to a visitor based on the following historical visitor actions: clicks on products, adding a products to cart, and purchasing products. It is not recommended to use the personal
sort order with search, such as with a search panel, as the match quality is not considered for the sorting.
The intended use of personal sort is for category or other landing pages. On these pages broad queries span large sets of products and match quality is either evident or meaningless. The personal sort brings up to five personalized products to the top and backfills with the current best-selling products.
The default sorting modifier for personal
is desc
. It is not recommended to include a sorting modifier when sorting by personal
. Products in panels sorted by personal
are affected by exposure strategies, boost, and bury.
Product selection¶
A score is given to the most recent of historical visitor actions: clicks on products, adding products to cart, and purchasing products. Historical actions does not include actions from the current session. The score for clicks and add-to-cart actions are lowered with age. For each of these product actions a probabilistic distribution is created which connects the product to other products based on criteria such as how often the products are bought together, and how often the products are clicked in the same session. The scored distributions are then merged and the top products are returned.
The personal
sort order uses the top five products returned. The Recommend based on customer panel use the same method for product selection but with the arguments window_first
and window_last
to determine what number of products to return.
Example arguments¶
sort_by: personal
Sort by sales¶
The sales
sort order sorts products according to their strategy score.
The optimal period of time for the strategy score is automatically and individually chosen per product. This enables statistically significant trends to be recognized, and adequately compare products with a steady purchase rate to those that have quick changes in popularity.
The default sorting modifier for sales
is desc
. It is not recommended to include a sorting modifier when sorting by sales
. Products in some panels sorted by sales
are affected by exposure strategies, boost, and bury.
Example arguments¶
sort_by: sales
Sort by clicks¶
The clicks
sort order sorts products according to popularity based on recent clicks. This type of sorting is useful when products cannot be purchased, such as for sites where accessories are sold for devices, but not the actual device itself. Sorting with clicks
can be used as a good alternative for sites with low traffic as clicks are more frequent than purchases.
The default sorting modifier for clicks
is desc
. It is not recommended to include a sorting modifier when sorting by clicks
.
Example arguments¶
sort_by: clicks
Sort by arithmetics¶
Custom sort orders can be created with arithmetics, using operators with sorting types. Normal execution precedence is applied but can be overridden with parentheses. It is also possible to use floating point literals.
It is not recommended to use the relevance
sorting type in arithmetic expressions.
The default sorting modifier for a custom sort order is asc
. It is recommended to include a sorting modifier when sorting by custom order.
Operations¶
The following operators are allowed when creating custom sort orders.
Sign | Operator | Example | Description |
---|---|---|---|
+ | Addition | a+b | Binary addition of the terms a and b. |
- | Subtraction | a-b | Binary subtraction of the terms a and b. |
- | Negation | -a | Unary negation of the term a. |
* | Multiplication | a*b | Binary multiplication of the terms a and b. |
/ | Division | a/b | Binary division of the terms a and b. |
^ | Exponentiation | a^n | The term a raised to the power of n. |
~ | Round | ~a | Unary round of the term a to the closest integer. |
% | Modulo | a%b | Binary module operation of the terms a and b. |
Example arguments¶
sort_by: (avg_rating * rating_count + 300) / (rating_count + 100) desc
Multi-level sorting¶
Additional sorting levels can be used when sorting products. This is useful when there is a likelihood of multiple products having the same primary rank. The levels of sort orders are separated by a comma, ,
, in the sort_by
argument and are listed in priority order.
Multi-level sorting affect the behavior of exposure strategies, boost, and bury in the panels they are used. For example, a site selling Blu-Ray and DVD movies has an active boost for a certain kind of DVDs. A panel is used to list movies with format asc
as a primary sort and relevance
as a secondary sort. Movies with the Blu-Ray
format will thus be returned before the DVD
format.
The active boosting will not place the DVDs selected in the boost above the returned Blu-Ray movies as format
is the primary sort, but it will affect in what order products with the DVD
format are returned.
Example arguments¶
sort_by: format asc, relevance
sort_by: in_stock desc, relevance
sort_by: price desc, title asc
sort_by: price asc, sales desc
Sorting recommendations¶
Following is a recommendation of when different sort orders are appropriate.
Sort order | Modifier | Pros | Cons | Usage example |
---|---|---|---|---|
Any product attribute | Attribute dependent | Sort order can be customized. | No personalisation Cannot adjust for current trends | Alphabetically ordered lists Lists ordered by price or release date |
relevance | None | Sort order adjusts to trends. | Search results | |
personal | None | Sort order is trend adjusted and personalized. | Category pages | |
sales | None | Good when popularity is essential. | No personalisation | What's hot-lists |
clicks | None | Good when popularity is essential and the site is heavily relying on offline purchases. | No personalisation | What's hot-lists Low traffic sites |
Refinements¶
Refinements can be set for sort attributes in the Voyado Elevate manager to enable normalisation of product attributes before sorting. The most common usage of refining is to normalise text to lower case or to remove all non-digit characters before sorting by price. The following refinement settings are available:
(no refinement)
- No normalisation is performedCase insensitive
- Normalisation to lower caseKeep digits and letters (e.g. Text123)
- Removes all characters that are neither letters or digits, including spacesKeep digits and letters, case insensitive
- Removes all characters that are neither letters or digits, including spaces, and normalises letters to lower caseKeep digits only (e.g. 1234)
- Removes all characters that are not digits