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



{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)


SET @couponCode = Field(@couponRow,“CouponCode”)



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


How to orient your customers to the nearest store

How to orient your customers to the nearest store, using Email Studio & Content Builder 


Have you ever been to your favorite store, just to realize once there that it had moved? Well, very often, it moves but only to remain in the same area…However, you could not guess that since no communication on the new address was shared via email, SMS or even social media.

We will see here how to take care of your customers by giving them the right information and guaranteeing an enjoyable shopping experience.

First, we can communicate the address of the store closest to their home by email. To do this we will need:

1- Data extension sendable with customer information (email, first name, address)

1 –Data extension not sendable with store codes and their addresses.

And also, the basics of the LOOKUP function of the AMPscript code.

A-Our sendable data extension for sending emails to the customer

 B-Our non-sendable data extension with stores attributes

Here the corresponding code that will be displayed in your email sending with the store address closest to the customer.


Dear %% First Name %%

Your return request has been taken into account.

Thank you for returning your item in its original condition to the nearest store:


Var @StoreAddress, @ Address1

Set @ Address1 = [Address1]

Set @StoreAddress = Lookup( “Data_ExtensionB”, “ City ”, “Address2”, @ Address1)



See you soon for an upcoming article!

Live with pleasure!