I’m experiencing an issue with my Klaviyo dynamic block in a subscription flow. When a customer orders a single item, the email displays the correct details. However, when they order multiple items, the dynamic block repeats every section in the blocks.
I’m using "event.items" in the row collection and "item" as the row alias.
Has anyone encountered this before? Is there something I might be missing in the setup? I’ve attached here my setup so you could help me investigate the issue.
1st photo - the code used in the row collection, row alias, and the event properties used in the dynamic sections 2nd photo - to show the preview of a customer ordered only 1 item and showing correctly 3rd photo - to show the duplicate blocks in the dynamic block and the event arrays in preview
1st photo - the code used in the row collection, row alias, and the event properties used in the dynamic sections2nd photo - to show the preview of a customer ordered only 1 item and showing correctly 3rd photo - to show the duplicate blocks in the dynamic block and the event arrays in preview
Any advice on how to ensure the email correctly loops through all purchased items would be greatly appreciated!
Thanks in advance!
Best answer by JaneImpelido
Update: I’ve managed to resolve the issue myself! In case someone in the future will encounter the same problem. I’m leaving this piece of advice to help them resolve this issue.
The problem was that my entire dynamic block was set to ‘Dynamic’ which caused repeating instead of just the Order Details section.
What I Did:
I changed the subscription details, fulfillment info, referral code, and order number to ‘Static’ content instead of using ‘Dynamic’.
I used the content repeat function only for the Order Details section as ‘Dynamic’.
This ensured that the static information only appeared once, while the Order Details section repeated correctly for multiple items.
Update: I’ve managed to resolve the issue myself! In case someone in the future will encounter the same problem. I’m leaving this piece of advice to help them resolve this issue.
The problem was that my entire dynamic block was set to ‘Dynamic’ which caused repeating instead of just the Order Details section.
What I Did:
I changed the subscription details, fulfillment info, referral code, and order number to ‘Static’ content instead of using ‘Dynamic’.
I used the content repeat function only for the Order Details section as ‘Dynamic’.
This ensured that the static information only appeared once, while the Order Details section repeated correctly for multiple items.
So when you have a table block set to dynamic, it is going to make both sections of that table dynamic, which will cause ‘ORDER DETAILS’ to be shown twice. A workaround for this would be to, rather than using a table block, insert a new section, then drag a column block into that section and select two columns. From there, drag a text block into each column. For the text block on the left, you can type in ORDER DETAILS and then make any styling changes you’d like. For the text block on the right, you can mimic a dynamic table by setting up content repeat rules, like so:
From here, you will need to identify the correct Product Name variable, and then replace the row collection with the row alias. So for example, if your product name variable is {{ event.extra.line_items.0.name}}, you would want to change this to {{ item.name }} so that it repeats ALL items in a customers order!
By clicking “Accept All Cookies,” you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts.
Privacy Preference Center
Your Privacy
Strictly Necessary Cookies
Performance Cookies
Functional Cookies
Targeting Cookies
Site Analytics
Your Privacy
When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.
Privacy Notice
Strictly Necessary Cookies
Always Active
These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.
Performance Cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.
Functional Cookies
These cookies enable the website to provide enhanced functionality and personalisation. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.
Targeting Cookies
These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising.
Site Analytics
These cookies record your visit to our website, and are used to track your visit including information such as: web page interactions (clicks, hovers, focus, mouse movements, browsing, zooms and other interactions), referring web page/source through which you accessed the Sites, heatmaps and scrolls, screen resolution, ISP, and statistics associated with the interaction between device or browser and the Sites. If you are accessing our Services with a European IP address, you have been asked to consent to the use of these cookies (you are free to deny your consent).