Skip to content

Recommendation Panels

The pre-defined recommendation panels all display product recommendations based on the parameters and incoming arguments that are sent with a panel query.

For mandatory arguments for all panels including request URL format, see Panel Query.

Recommend based on cart panel

The result of a query to this panel is a list of recommended products given the products in a visitor's shopping cart. The products are ordered according to probability of purchase. The result can be filtered to only include particular types of products. Products that are added to the shopping cart during the current and the most recent session are automatically filtered out of the result.

The result is a list of product elements, each specifying all presentation attributes and the list rank of that product. Each product contains all its variants that match the filter ranked by sales.

The arguments window_first and window_last must be included in a query to this panel.

Panel arguments

Name Type Description Example
cart string A comma-separated list of product keys. P1,P4
filter
Guide
filter An expression limiting the possible product and variant set. Defaults to UNIVERSE if omitted in the query. color:'red' OR color:'blue' AND in_stock:'true'
presentation_attributes
Guide
string A comma-separated list of the attributes from product data to present. Default presentation attributes are used if omitted in the query. title,author
variants_per_product int The maximum number of variants per product to include in the result. No maximum limit. 10
window_first int The first position in the list to be presented. Products before this position, according to the sorting, are not present in the result. The position of the first product in the list is 1.
Required argument.
1
window_last int The last position in the list to be presented. Products after this position, according to the sorting, are not present in the result. The following bounds apply: 1 ≤ window_firstwindow_last ≤ 10 000.
Required argument.
5

Example panel content

The following example will use the panel arguments cart: P1,P4, window_first: 1, and window_last: 5 to return recommendation data.

JSON
{
  "resultType": "products",
  "products": [{
          "key": "P2",
          "ticket": "Oy9kb2N1bWVudGF0aW9uLWV4YW1wbGU7Iztwcm9kdWN0X2tleTtQMjsjOztOT05FOk5PTkU7NTE7",
          "variants": [{
                  "key": "P2_V1",
                  "ticket": "Oy9kdWN1bWVudGF0aW9uL2V4YW1wbGU7Iztwcm9kdWN0X2tleTtQMjtQMl9WMTs7Tk9ORTpOT05FOzM3Ow====",
                  "attributes": {
                      "custom_attribute": "value",
                      "variant_key": "V1"
                  }
              },
              {
                  "key": "P2_V2",
                  "ticket": "Oy9kdWN1bWVudGF0aW9uL2V4YW1wbGU7Iztwcm9kdWN0X2tleTtQMjtQMl9WMjs7Tk9ORTpOT05FOzM3Ow======",
                  "attributes": {
                      "custom_attribute": "value",
                      "variant_key": "V2"
                  }
              }
          ],
          "attributes": {
              "product_key": "P2",
              "rank": "1",
              "custom_attribute": "value1"
          }
      },
      {
          "key": "P3",
          "ticket": "Oy9kb2N1bWVudGF0aW9uLWV4YW1wbGU7Iztwcm9kdWN0X2tleTtQMzsjOztOT05FOk5PTkU7NTE7",
          "variants": [],
          "attributes": {
              "product_key": "P3",
              "rank": "2",
              "custom_attribute": "value2"
          }
      }
  ]
}

Recommend based on customer panel

The result of a query to this panel is a list of recommended products based on the history of clicks, previous purchases, and current shopping cart of a visitor. The products are ordered according to probability of purchase. The result can be filtered to only include particular types of products.

The result is a list of product elements, each specifying all presentation attributes and the list rank of that product. Each product contains all its variants that match the filter ranked by sales.

The arguments window_first and window_last must be included in a query to this panel.

Panel arguments

Name Type Description Example
facets facets A pipe-separated list of selected facet values. Used to limit the set of products and variants to use for the product count. Ignored if omitten in the query. color:red|blue,size:6
filter
Guide
filter An expression limiting the possible product and variant set. Defaults to UNIVERSE if omitted in the query. color:'red' OR color:'blue' AND in_stock:'true'
presentation_attributes
Guide
string A comma-separated list of the attributes from product data to present. Default presentation attributes are used if omitted in the query. title,author
selected_category category A selected category on the form: <tree name>:'<category key>'. Only products from this category and its sub-categories will be included in the result. Products from all categories are considered if omitted in the query. category:'Ladies'
variants_per_product int The maximum number of variants per product to include in the result. 10
window_first int The first position in the list to be presented. Products before this position, according to the sorting, are not present in the result. The position of the first product in the list is 1.
Required argument.
1
window_last int The last position in the list to be presented. Products after this position, according to the sorting, are not present in the result. The following bounds apply: 1 ≤ window_firstwindow_last ≤ 10 000.
Required argument.
5

Example panel content

The following example will use the panel arguments window_first: 1, and window_last: 10 to return recommendation data.

JSON
{
  "resultType": "products",
  "products": [{
          "key": "P2",
          "ticket": "Oy9kb2N1bWVudGF0aW9uLWV4YW1wbGU7Iztwcm9kdWN0X2tleTtQMjsjOztOT05FOk5PTkU7NTE7",
          "variants": [{
                  "key": "P2_V1",
                  "ticket": "Oy9kdWN1bWVudGF0aW9uL2V4YW1wbGU7Iztwcm9kdWN0X2tleTtQMjtQMl9WMTs7Tk9ORTpOT05FOzM3Ow====",
                  "attributes": {
                      "custom_attribute": "value",
                      "variant_key": "V1"
                  }
              },
              {
                  "key": "P2_V2",
                  "ticket": "Oy9kdWN1bWVudGF0aW9uL2V4YW1wbGU7Iztwcm9kdWN0X2tleTtQMjtQMl9WMjs7Tk9ORTpOT05FOzM3Ow======",
                  "attributes": {
                      "custom_attribute": "value",
                      "variant_key": "V2"
                  }
              }
          ],
          "attributes": {
              "product_key": "P2",
              "rank": "1",
              "custom_attribute": "value1"
          }
      },
      {
          "key": "P3",
          "ticket": "Oy9kb2N1bWVudGF0aW9uLWV4YW1wbGU7Iztwcm9kdWN0X2tleTtQMzsjOztOT05FOk5PTkU7NTE7",
          "variants": [],
          "attributes": {
              "product_key": "P3",
              "rank": "2",
              "custom_attribute": "value2"
          }
      }
  ]
}

Recommend based on product panel

The result of this query to this panel is a list of recommended products given a specific product. This is intended for pages that display product information, for example when a user has clicked on a product and is routed to a page with more information about that specific product.

Recommendations are based on the product given in the product_key argument and relationship data between it and products it (including but not limited to) has been purchased or otherwise shared a shopping cart with. Other relationship data include click data and product attributes. The products are ordered according to probability of purchase. The result can be filtered to only include particular types of products and variants.

The result is a list of product elements, each specifying all presentation attributes and the list rank of that product. Each product contains all its variants that match the filter ranked by sales.

The arguments product_key, window_first, and window_last must be included in a query to this panel.

Panel arguments

Name Type Description Example
filter
Guide
filter An expression limiting the possible product and variant set. Defaults to UNIVERSE if omitted in the query. color:'red' OR color:'blue' AND in_stock:'true'
presentation_attributes
Guide
string A comma-separated list of the attributes from product data to present. Default presentation attributes are used if omitted in the query. title,author
product_key string The product key of a specific product.
Required argument.
P4
variants_per_product int The maximum number of variants per product to include in the result. No maximum limit. 10
window_first int The first position in the list to be presented. Products before this position, according to the sorting, are not present in the result. The position of the first product in the list is 1.
Required argument.
1
window_last int The last position in the list to be presented. Products after this position, according to the sorting, are not present in the result. The following bounds apply: 1 ≤ window_firstwindow_last ≤ 10 000.
Required argument.
5

Example panel content

The following example will use the panel arguments product_key: P4, window_first: 1, and window_last: 5 to return recommendation data.

JSON
{
  "resultType": "products",
  "products": [{
          "key": "P2",
          "ticket": "Oy9kb2N1bWVudGF0aW9uLWV4YW1wbGU7Iztwcm9kdWN0X2tleTtQMjsjOztOT05FOk5PTkU7NTE7",
          "variants": [{
                  "key": "P2_V1",
                  "ticket": "Oy9kdWN1bWVudGF0aW9uL2V4YW1wbGU7Iztwcm9kdWN0X2tleTtQMjtQMl9WMTs7Tk9ORTpOT05FOzM3Ow====",
                  "attributes": {
                      "custom_attribute": "value",
                      "variant_key": "V1"
                  }
              },
              {
                  "key": "P2_V2",
                  "ticket": "Oy9kdWN1bWVudGF0aW9uL2V4YW1wbGU7Iztwcm9kdWN0X2tleTtQMjtQMl9WMjs7Tk9ORTpOT05FOzM3Ow======",
                  "attributes": {
                      "custom_attribute": "value",
                      "variant_key": "V2"
                  }
              }
          ],
          "attributes": {
              "product_key": "P2",
              "rank": "1",
              "custom_attribute": "value1"
          }
      },
      {
          "key": "P3",
          "ticket": "Oy9kb2N1bWVudGF0aW9uLWV4YW1wbGU7Iztwcm9kdWN0X2tleTtQMzsjOztOT05FOk5PTkU7NTE7",
          "variants": [],
          "attributes": {
              "product_key": "P3",
              "rank": "2",
              "custom_attribute": "value2"
          }
      }
  ]
}
×