So here's my use case: I need to send a weekly email containing all upcoming webcasts from our ecommerce site to our our subscriber base.

I have a file of website products and I have a separate DE of subscribers. I am populating an email dynamically using AMPscript - pointing to product file DE; however, the product file is not sendable because there arent any associated subscribers. When I select the DE of subscribers in the send email automation, the automation fails because it doesnt have all of the necessary product data.

Shouldnt I be able to populate an email with product data from one DE and send to another DE of subscribers?

  • You really should include your code, otherwise we wont be able to help – Johannes Schapdick Nov 14 '19 at 14:15

You can use a combination of LookupRows, Row and Field, to query your product Data Extension and return data from there. There should be a field which is both in your sendable data extension as well as in the product data extension, in order to return your matching rows. Here is an example:

set @rows = LookupRows("products","customer", _subscriberkey)
set @rowCount = rowcount(@rows)
if @rowCount > 0 then
for @i = 1 to @rowCount do
var @productName
set @row = row(@rows, @i)
set @productName = field(@row,"productName")
OutputLine(Concat("Your product is: ",@productName))
next @i 
  • Not LookupOrderedRows? ;) – Johannes Schapdick Nov 14 '19 at 14:16
  • A matter of taste ;-) – Lukas Lunow Nov 14 '19 at 14:21
  • Thanks so much for the suggestions - I think we got it working now. I didnt realize that we could reference two different DEs in a LookupOrderedRows (or LookupRows) function. – Zanah Kagan Nov 17 '19 at 23:41
  • You are welcome, @ZanahKagan. Remember to mark the answer as accepted – Lukas Lunow Nov 18 '19 at 5:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.