Okendo Product Review Aggregate Feed

  • 17 May 2024
  • 2 replies
  • 28 views

Badge

Hi there,

 

I’m building out a Welcome series. I’m wanting to use Okendo’s Product Review Aggregate Feed on the products I feature within the welcome email. I need the reviews count to be dynamic so it’s accurate and creates more social proof as we get more reviews. Is there a way to do this? 

 

I’m following this doc and it seems it may be possible if I play with the source code a little. My only issue is it needs to be static - not event based. Aka the product will not change.

This is the closest example but only works for dynamic placements:

https://support.okendo.io/en/articles/7213454-add-a-rating-aggregate-to-abandoned-cart-emails-in-klaviyo-new-editor

 

This is not what I’m after as I only want the reviews count over actual reviews:

https://support.okendo.io/en/articles/7220816-display-specific-product-reviews-in-klaviyo-emails

 


2 replies

Userlevel 7
Badge +36

Hi @StudioGreene!

I will check on this internally and update the thread ASAP!

- Brian

Badge

Posting the answer here: 

You'll need to go through the steps here to add a web feed. 

Then in the email paste this code as a source, wherever you want the snippet. 

{% with productId=event.ProductID|slugify %} {% for value in feeds.product_review_aggregate %} {% if productId == value.product_id %}
<table cellpadding="0" cellspacing="0" style="border:0;">
 <tbody>
 <tr>
 <td style="padding-top:2px;padding-right:2px"><img height="14" src="https://d3hw6dc1ow8pp2.cloudfront.net/emails/review/stars/stars-{% widthratio value.rating 1 10 %}-000000.png" style="height:14px;" /></td>
 <td>
 <p style="padding-top:1px;padding-left:2px;font-size:14px;">{{ value.count }} {% if value.count > 1 %} Reviews {% endif %}{% if value.count == 1 %} Review {% endif %}</p>
 </td>
 </tr>
 </tbody>
</table>
{% endif %} {% endfor %} {% endwith %}
 

Change event.ProductID|slugify to the product Id. For example: productId="123456789" 

Just make sure to keep the quotation marks

Reply