Loading...
Area: Optimizely Product Recommendations
Applies to versions: 1.0 and higher (Server-to-Server API)

Product Recommendations response

Recommended reading 

If Product Recommendations were configured by Optimizely for a page being tracked, a list of product recommendations is returned in the message.

The contents are returned in the smartRecs element at the root of the JSON response. The element contains product recommendations generated by the Optimizely recommendations engine. These product recommendations are grouped by widget.

The value of smartRecs is a list of recommendation widget elements. These elements have the following properties.

  Name Description and usage
smartRecs  
  widget [String]

Name of the widget.

Use for information only; it may vary during A/B testing. To determine where to place a widget on the page, use the position attribute.
  alias [String]

Alias of the widget.

Use for information only.
  position [String]

Name of the page position for this widget.

Use to determine the page position in which to show this widget.
    recs A list of recommendations.
      img [String]

URL of the product image.
      title [String]

Product title.
      url [String]

URL to the item's product page.
      refCode [String]

Product reference code.
      prices A map in which the key is the currency name (such as USD, GBP, and so on) and the value is a map with unitPrice and salePrice properties.
        unitPrice [Number]

The price per unit of the item.
        salePrice [Number]

The sale price of the item.
      id [64-bit Number]

Optimizely recommendation ID.
      attributes A list of attributes and their values.

Attributes required in the request. See Recommendations configuration.

To configure output details for the recommended product in the request, use the recContent request parameter.

Do you find this information helpful? Please log in to provide feedback.

Last updated: Nov 06, 2017

Recommended reading