Creating Gift Voucher with Salesforce Marketing Cloud

Do you know the British clothing brand Boden? Well, I was a fan during 2 years and of course, I received tons of emails in that time.  This weekend, I was sorting my mailbox and I saw this email below Then one question comes in my mind: how to create this e-mail with Salesforce Marketing cloud? Let’s look at this together …  1) Create a Data extension named {  CouponCodes} Fields:  {Name= Couponcode ; Data type= Text; Length =100; Primary Key= True, Nullable= none; Default Value = none} {Name= Isclaimed; Data type= Boolean; Length =none; Primary Key= false, Nullable= true; Default Value = False} {Name= EmailAddress; Data type= EmailAddress; Length =none; Primary Key= false, Nullable= true; Default Value = none} 2) Create a list of coupon codes  like the ones below and save them in a  CSV file 3) After that, you can import the data in your Data extension create “ Codes Coupons” To do that, return to your data extension and click on the “import” button. 4) For this last step in Email studio, add this AMPScript to your e-mail. %%[ var @couponRow, @email,  @couponCode set @email= AttributeValue(“EmailAddress”) set @couponRow = ClaimRow(“CouponCodes”,“IsClaimed”, “EmailAddress”, @email) if empty(@couponRow) then RaiseError(“No coupon code”, false) else SET @couponCode = Field(@couponRow,“CouponCode”) endif ]%% Your coupon code: %%=v(@couponCode)=%% By the way, you can follow #Boden 🙂 Some pieces of the new collection here 🙂 See you soon with a new post! Live with pleasure Cornelia