Dynamic Block Based on Cart


I’m currently updating our abandoned cart flow and looking to personalize it further. 

Is it possible to show specific testimonials based on what’s in their cart? For example, if customer added shorts to their cart it would only short testimonials for our shorts. If customer adds shorts and jersey, they would receive a testimonial for both products. 



Best answer by alex.hong 11 May 2022, 01:40

View original

2 replies

Userlevel 6
Badge +37

Hi there @cyclist-jz,

Thanks for sharing to the Community.

It sounds like you would want to use our Show/Hide feature for blocks based on certain variables. In this case, the variable would have to look for an item in the cart and display only if item X is found. You can find all of the details on how to show/hide blocks based on event data here.
I recommend reading through that guide as well as the other sections. Some of the other sections have examples of different formatting that can be used. Essentially you are able to set a block to only show if "XYZ" is in "event.items". Of course you would have to build out the actual names and event variables, but that is the general structure. You will find that you can set this to be an exact match or a contains match. 

Often times, customers have found that platforms like Shopify does not provide Klaviyo with a way to dynamically add customer reviews to an email.  What some of our customers choose to do is to add Text Blocks to their emails and to manually copy-and-paste reviews to their emails.  These reviews are static and require our customers to manually update these responses from time to time.

Alternatively, some of our other customers choose to integrate a Review platform with their Klaviyo account.  You can see a number of integrations we offer for this type of service here.  You can use any of these integrations to dynamically add reviews to your emails.


Hope this helped,





Thank you Alex. I will give this a try and report back as to whether this worked or not.