Loading...
Area: Episerver Perform, Episerver Reach
Applies to versions: 1.4 and higher (Server-to-Server API)
Other versions:

Recommendations configuration

If the Recommendations product were enabled for the current page, you can request that additional product attributes for the product be supplied in the smartRecs response.

Name Description Usage
smartRecs    
  showAttributes Controls which attributes to show in the smartRecs callback.

[Optional]

An array of attribute names to send in the smartRecs callback. If this property is not supplied, no attributes are sent. If this property is set to "*", all available attributes are sent.

  markRecsAsShown Whether all recommendations sent as the response are rendered.

[Optional]

This must be included if a subset of recommendations sent as the response is rendered on the front end of your site/application.

Default is true; that is, all recommendations in the response are assumed to have been rendered. See Rendering Recommendations.

If set to false, an additional API call needs to be made to inform Episerver of the IDs of recommendations that have been rendered.

Recommendations configuration example

For example, on a product page tracking request, to show all attributes for the recommended products, you might send the following.

{
  "type"        : "product",
  "ip"	        : "10.42.37.139",
  "session"     : "123456789012|a1b2c3d4e5A6B7C8D9E0f1g2h3i4j5F1G2H3I4J5k1l",
  "cuid"        : "09876543210|Z0Y9X8W7V6z5y4x3w2v1U0T9S8R7Q6u5t4s3r2q1P0O",
  "site"        : "retailer",
  "clientToken" : "1234abcd5678",
  "channel"     : "web",
  "lang"        : "en-gb",
  "currentURI"	: "www.retailer.com/product/RC123.html",
  "previousURI" : "www.retailer.com/home",
  "userAgent"   : "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
  "smartRecs"   : {
                    "showAttributes": ["*"]
                  },
  "product"     : {
                    "refCode": "RC123"
                  }
}

For the callback to contain only the attribute "colour" for each recommended product, send the following.

{
  "type"        : "product",
  "ip"          : "10.42.37.139",
  "session"     : "123456789012|a1b2c3d4e5A6B7C8D9E0f1g2h3i4j5F1G2H3I4J5k1l",
  "cuid"        : "09876543210|Z0Y9X8W7V6z5y4x3w2v1U0T9S8R7Q6u5t4s3r2q1P0O",
  "site"        : "retailer",
  "clientToken" : "1234abcd5678",
  "channel"     : "web",
  "lang"        : "en-gb",
  "currentURI"  : "www.retailer.com/product/RC123.html",
  "previousURI" : "www.retailer.com/home",
  "userAgent"   : "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
  "smartRecs"   : {
                    "showAttributes": ["colour"]
                  },
  "product"     : {
                    "refCode": "RC123"
                  }
}

Last updated: Nov 06, 2017