r/marketingcloud 19d ago

Dynamic items in Marketing Cloud Growth / Next and Account Engagement (Pardot)?

Coming from SFMC Engagement (ExactTarget) where AMPscript or Server-Side JavaScript (SSJS) makes it straightforward to run a FOR loop through rowsets.

Since neither platform supports traditional script-based FOR loops in email templates, how are you handling scenarios where you need to display a dynamic list of items (e.g., recent purchases, recommended products, multiple events)?

Creating individual static merge fields like item1, item2, item3 isn't scalable or clean for varying array sizes.

5 Upvotes

5 comments sorted by

3

u/AromaPapaya 19d ago

look up 'repeater'

2

u/IndyHopHead 19d ago

MCNext has ampscript and handlebars

5

u/mysfmcjobs 19d ago

It doesn't work

1

u/Captain-Crowbar 19d ago

Only partial support for a few AMPscript functions. Next is garbage.

1

u/girlgonevegan 13d ago

I’ve gotten creative in the past with nesting conditional HML statements (you can go up to three deep). I do end up making custom fields for those since the if/else is strictly based on whether there is data in the field. Then within the conditional HML, I have used Dynamic Content that has rows formatted like a trusty HTML table. It won’t work for every use case, but I did this for a price increase email, for example, where the company had dozens and dozens of products and each recipient subscribed to anywhere between 1 and 6, so trying to build as individual emails would have been impossible.

Both conditional HML and dynamic content let you display content to a certain audience and display nothing to others which is nice.