I need to implement coupon claim process while sending email through campaign or journey ?

What is the solution to claim coupon code in email .

I have created a DE with 3 columns (CouponCode/IsClaimed/SubscriberKey) as mentioned in below link and loaded coupon codes into DE. https://help.salesforce.com/articleView?id=mc_moc_offer_coupon_codes_via_ampscript.htm&type=5

I'm stuck in 2nd step on claiming coupon code in email . Please help


As you have already created the Data Extension you need to loop through the Data Extension.

  1. Show fallback content if the IsClaimed Field has a 'True' value

  2. Show the coupon code if the IsClaimed Field has a 'False' value.

     %%[ Set @CouponRow = ClaimRow("DE_NAME", "IsClaimed", "SubscriberID", 
     SubscriberID, "EmailAddress", Emailaddr) IF EMPTY(@CouponRow) THEN]%%
      <tr>No coupon code</tr>
     %%[ELSE ]%%  
     <!-- SHOW COUPON CODE --> <tr>%%= FIELD(@CouponRow,"CouponCode") =%%</tr>
  • Thanks Jordan, I tried the solution provided in ampscript guide and it worked. ampscript.guide/raiseerror The challenge I am facing now is, Couponcodes DE I have 2 coupon codes & my audience DE let's say I have 3 recipients, the email is being sent for 2 persons with coupon code and the error is not being thrown for the 3rd recipient. Where can I view the error message "No coupons available". Will it be visible in UI? I checked for the status from Tracking Tab and it has been delivered to 2 recipients. Jun 17 '20 at 11:58
  • Hi Prasanna, in this case, when the audience DE is linked to the Couponcodes DE, the error message will be displayed in a UI. It's up to you how you want to display it using HTML. I would suggest running a test in Email Studio. Jun 17 '20 at 13:29

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.