Skip to main content

Product recommendations

Engage's Product Recommendation engine looks at all historical purchases and identifies how products relate to each other through the behavior of your customers. Once the AI engine learns your customers' purchase and return behavior, it can use their favorite product categories, favorite brands, viewed relevant products online, and abandoned carts to present them with personalized product recommendations.

For an introduction to product recommendations in Engage, check out this article.

Tip

if you want to control which products are included in the recommendation engine and which are not, you can use a separate product feed for product recommendations. However, if you do this, be aware that it needs to be structured the same way as your other product feeds.

Prerequisites for product recommendations

To get started with the recommendation engine, your Engage environment (tenant) needs to have these features activated:

  • Product feed (Only products that exists in this feed can be recommended)

  • A BI-export to the Engage BI-lake

Getting product recommendations

There is an API endpoint to do this. You'll need the contact's unique contact ID.

GET /api/v2/contacts/{contactId}/productrecommendations

The response will be something like this:

{
"skus":[
"1234","2345","3456","4567","5678","6789","7890","8901","9012","0123"]
}

If the request has not been successful, you'll get one of the following HTTP error codes:

  • 400 - InvalidContactId

  • 404 - ContactNotFound

Promote/demote items in product recommendations

It is possible to promote or demote items coming from the product feed. This is done with a number between -100 and 100 (referred to as the product's weight). A weight of -100 will demote the item to the maximum extent while 100 will promote it to the maximum extent. The "maximum extent" is determined by a setting in the back-end which control the maximum (and minimum) boost effect. So you need to inform your Voyado team if you plan to use promote/demote.

Important

The default value for the maximum / minimum boost effect is 20% and usually this is the best value.

The field in the XML containing the promotion weight for a product should be named productRecommendationPromotionWeight:

<productRecommendationPromotionWeight>50</productRecommendationPromotionWeight>

Here is an example of XSLT that populates the promotion weight field in the product feed:

<!-- Product recommendation transformation-->
<xsl:choose>
  <xsl:when test="contains(translate(g:brand, $uppercase, $lowercase), 'myownbrand') and contains(translate(g:brand, $uppercase, $lowercase), 'type a')">
    <productRecommendationPromotionWeight>
      50
    </productRecommendationPromotionWeight>
  </xsl:when>
  <xsl:when test="contains(translate(g:brand, $uppercase, $lowercase), 'myownbrand')">
    <productRecommendationPromotionWeight>
      100
    </productRecommendationPromotionWeight>
  </xsl:when>
  <xsl:when test="contains(translate(g:brand, $uppercase, $lowercase), 'lowmarginbrand')">
    <productRecommendationPromotionWeight>
      -25
    </productRecommendationPromotionWeight>
  </xsl:when>
  <xsl:otherwise>
    <productRecommendationPromotionWeight>
      0
    </productRecommendationPromotionWeight>
  </xsl:otherwise>
</xsl:choose>
</product>
</xsl:template>
<xsl:variable name="lowercase" select="'abcdefghijklmnopqrstuvwxyzàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿžšœ'" />
<xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞŸŽŠŒ'" />

This example would result in products with "MyOwnBrand" in the name being promoted fully (the default boost of 20% multiplied by 100%, which is the value given in the XSLT).

Products where brand name contains "MyOwnBrand" and are of Type A have a weight of 50, and so would be promoted at half strength (meaning around 10%, which is 50% of the default value).

And those with "LowMarginBrand" would be demoted since they have a negative promotion weight (around -5% since 25 is a quarter of 100).

In this case, all other brands would receive no promotion or demotion since their weight is 0.

Caution

If promotion weight is used, be careful that no field is left without a promotion weight. An empty field will result in a null value which the model converts to 0. This might not be the intended effect.