General information

You can use filters to further customise the algorithms. They allow you to personalise the algorithm output to your specific criteria. For example, you want to use related products, but leave in the output only products more expensive than 5000r. or similar products that will be exclusively red in colour. All these conditions can be set using filters (algorithm settings). With the help of filters you can also prohibit the display of any product or product category in recommendations.

Types of filters

A filter works with the algorithm's product output and allows you to adjust the list of recommended products according to the specified parameter values. Filters are divided into SOFT and HARD: SOFT-filter will be applied only if after filtering the number of goods in the output will be more or equal to the required number of goods in the block of recommendations, HARD-filter will be applied even if after filtering the number of goods in the output will be less than the required number of goods in the block of recommendations. For example: you have SOFT-filter for certain parameters, which after filtering will find only 6 suitable products - in this case it will not be applied (because 6<10). But the HARD-filter will still work in this situation. If the SOFT-filter did not work on some condition (it gave out less goods than necessary and rolled back), it does not stop and still tries to apply the next condition.

Creating filters

You can use several different operators in filters:

Standard:

  • equal (accepts numeric and string values)
  • greater (only numbers)
  • less (numbers only)
  • greater than or equal to (numbers only)
  • less than or equal to (numbers only)
  • not equal (number and string)

and specific:

  • is in the range (accepts only numeric values in per cent) - the values of the selected parameter of recommended products will be in the range +-n% of the product to which the recommendation is matched. I.e. if a product with a price of 100p, will be given similar with the filter “Price is in the range of +-50%”, then in the block of recommendations will be only products with a price from 50 to 150p
  • make unique - all products in the output with this filter will have a unique value of the selected parameter. I.e. in the algorithm's output with the filter “Make size unique” one product of a certain article of each size will be given out.

Almost all filter conditions can be set relative to the product to which recommendations are selected or relative to a constant, which should be set manually. For example, the condition “Price is greater than or equal to…” can be configured as “Price is greater than or equal to 500p” or “Price is greater than or equal to the price of the recommended product”. In the first case a constant (500p) is used, and in the second case the main product parameter is used (it is not known in advance what the price of a particular product will be, because the algorithm will be applied to all products of the selected section, but the threshold of recommendation values will take it into account).

Within one filter you can set up to 10 different conditions, which will be applied sequentially in accordance with the order of their arrangement (from top to bottom). I.e. if the first condition is “colour equals red” and then “size equals L”, then only red products of size L will remain in the sample, not all red products and all products of size L.

Algorithm settings allow you to set a limit or a specific value for each parameter from your product feed. Available comparison operators for field data types from the product feed:

  • text (string) - equal/not equal/make unique
  • float - equal to/more than/more than or equal to/less than/in range/make unique
  • number - equal to/more/more or equal to/less/less or equal to/not equal to/in the range/make unique
  • bool - equal/not equal
  • date - equal to/more than/larger than/more than or equal to/less than/less than or equal to/not equal to/in the range/make unique

Applying filters when creating recommendations

You can use up to 5 filters in each recommendation block. The same filter can be used in different recommendation blocks (if you change it, it will change in all blocks).

You can apply up to 5 filters to one algorithm, each filter can consist of up to 10 conditions. That is, a maximum of 50 conditions can be applied to one algorithm. Several filters are applied to an algorithm according to the same scheme as the conditions within a filter: sequentially. For example, filter A with three conditions (A1, A2, A3) and filter B with two conditions (B1, B2) are applied to the algorithm. They will be applied in the following sequence: A1, A2, A3, B1, B2. At the output we will get goods that satisfy all five conditions (if any SOFT condition was not ignored).

To set up filters on an already running script you need to:

  • Pause the scenario
  • Run it again, after which the algorithm will change from “active” to “preparing”.
  • Go to edit the algorithm and apply the required filter by clicking on “adjust algorithm”.
  • Save. Filters will be applied within a day

Changing the status to “preparation” and adding filters will not affect the output of recommendations on the site and in emails. Blocks with recommendations will not “fly off” during such editing.

Last modified: 2023.12.13 10:41 by Anastasia Aniskova