1

I would like to send an email with 3 different coupon codes inside. I already have an if statement in the amp script that takes them based on the language code, but as it is the voucher code is displayed identical 3 times.

Is there an additional if condition or an iteration (similar to the "LookupOrderRows") that allows me to take different rows of the coupon DE?

My current ampscript is the following:

IF @lang == 'DE' THEN
SET @coupon = CLAIMROWVALUE("DE_name","vouchercode","IsClaimed","KeinCode","Id",@id)
ELSEIF @lang == 'EN' THEN 
SET @coupon = CLAIMROWVALUE("DE_name","vouchercode","IsClaimed","NoCode","Id",@id)
ELSEIF @lang == 'FR' THEN
SET @coupon = CLAIMROWVALUE("DE_name","vouchercode","IsClaimed","PasDeCode","Id",@id)
ELSEIF @lang == 'NL' THEN
SET @coupon = CLAIMROWVALUE("DE_name","vouchercode","IsClaimed","GeenCode","Id",@id)
ELSEIF @lang == 'IT' THEN
SET @coupon = CLAIMROWVALUE("DE_name","vouchercode","IsClaimed","NessunCodice","Id",@id)
ENDIF

1 Answer 1

0

Unfortunately the ClaimRow function doesn't support advanced lookups. There's a way to solve this scenario, however:

  1. To achieve this you first have to split your coupon data extension according to the language codes.
  2. Next you simply adjust your ampscript to call the language specific data extensions within your existing if statements.

It's a bit more setup work and less comfortable to manage during the campaign but it should do the job

Hope that helps.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .