Skip to main content

Hi team! I am wanting to have 3 dynamic 5-star reviews flow through to an email flow from Okendo but I’m struggling to get the code right in the text block? I’ve already set up the link to Okendo reviews in my web feeds and named it OkendoReviews.

I’ve been following the below guide, https://help.klaviyo.com/hc/en-us/articles/115005258768#populating-feed-content-in-your-template6


My content repeat is set up as,

Repeat For:

feeds.OkendoReviews.body.displayName.title|slice:'0:3'

Item Alias:

Item

 

My code in the text box is,

{% with item=feeds.OkendoReviews %} 

{ item.title }

{ item.body }

{ item.displayName }

{% endfor %}

{% endwith %}

 

Help! How do I get this to work? Thank you in advance!

Alana

Hi@BambooCreative!

Per the Help Center Article you mentioned, the syntax will depend on how your feed is setup on the source’s end. From the Help Center article:

If your feed is a JSON array, we'll automatically parse and show each row individually. If it's anything else, most likely a JSON dictionary, we'll show the entire dictionary.

 

So if your reviews on Okendo are formatted in an array, then you could likely use the following syntax for the Repeat For field:

{{ feeds.OkendoReviews.variable|slice:':3' }}

 

In this case, variable would the name of the value(s) that contain the array you want to iterate through. It’s difficult to tell what variable should be for your use case without seeing the JSON array, but it may be helpful if you’d be willing to share a screenshot of what your email looks like as it is now.

 

In the meantime, here are some Community threads on similar topics that may be helpful:

 

Best,

Brian


Reply