Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
SFMC AMPScript Flexible Content Areas with XML Interfaces 1
set @products = LookupOrderedRows("ProductDE",6, "AvgCustomerRating desc" ,"ApprovedForEmail","true")
set @productCount = rowcount(@products)
set @productXML = "<products>"
for @i = 1 to @productCount do
set @product = Row(@products, @i)
set @productImageURL = Field(@product, "ProductImageURL")
set @productXML = concat(@productXML,"<product>")
set @productXML = concat(@productXML,"<productImageURL><![CDATA[",@productImageURL,"]]></productImageURL>")
set @productXML = concat(@productXML,"</product>")
next @i
set @productXML = concat(@productXML,"</products>")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.