AI recommendations enriched with customer opinions

Published March 27, 2020
Modules
Difficulty


Other customers opinions often have a big impact on user purchasing decisions. We consider positive and negative opinions when we buy, especially when purchasing more expensive items.

It’s worth using positive opinions in AI ​​recommendation filters or boosting when displaying recommendations on the page. This will be helpful in campaigns which are created to promote the best products to those who best match them. In this way we can highlight them and encourage more people to buy them.

Example of use – Home appliances industry

One of our customers from the home appliances industry decided to exclude products with an average opinion below 3.0 in the recommendations on the home page. Additionally, while displaying recommendations on the site, he decided to sort the displayed products in order of number of opinions.

Screenshot presenting recommendations with opinions

Requirements

  • Tracker

  • Imported correct feed

  • Suitable AI models trained (e.g. personalized)

  • Two custom feed attributes:

  • Average product opinion

     Example name: <c: average_rating> 
     Attribute value type: numeric (float) 
    
  • Number of opinions expressed about the product

     Example name: <c: reviews_amount> 
     Attribute value type: numeric (float) 
    

How to do it


  1. Prepare an AI campaign that includes the right filter for the attribute with the average review.

  2. Prepare dynamic content for the campaign using inserts in Jinjava. Additionally, use Jinjava to sort products by number of reviews.

{% set tab = [] %}  
{% recommendations2 campaignId=campaign_hash %}  
{% for p in recommended_products2 %}  
{% set count = (loop.index - 1) %}  
{% for r in p.customAttributes %}  
{% if r.name == 'average_rating' %} 
 <!-- WE SAVE RATING AND INDEX OF PRODUCT -->  
{% do tab.append({rating:r.value, index: count}) %}  
{% endif %}  
{% endfor %}  
{% endfor %}  
{% for r in tab|sort(true, true, 'rating') %}  
{{ r }}  
<!-- SHOW PRODUCTS SORTED BY RATING -->  
{{ recommended_products2[r.index].productRetailerPartNo }}<br>  
{% endfor %}{% endrecommendations2 %} 

Read more


😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

Close modal icon Placeholder alt for modal to satisfy link checker