Marketing Cloud has different ways to personalise content and messages that are very impressive. This post focuses on AmpScript in personalisation strings. AMPScript is a language that can be embedded into templates, applications and landing pages to personalise them.
What does it look like?
Imagine I received the following personalised text email from my local garden centre.
Hello Hello Kloud!
We are so pleased you have chosen us as your supplier of vegetable seeds.
We wanted to tell you about our latest offer that ends today 20th September 2021!
[Insert Personalised Voucher Code]
Many thanks
Local Garden Centre
Which in AMPScript looks like:
Hello %%Customer_name%%!
We are so pleased you have chosen us as your supplier of %%=v(@Latest_Purchase)=%%.
We wanted to tell you about our latest offer that ends today %%=v(@todaydate)=%%!
%%[Insert Personalised Voucher Code]%%
Many thanks
Local Garden Centre
The first AMPScript entry is %%Customer_Name%%. It is calling a value from the Data Extension containing the subscribers full name we are going to send to.
The second AMPScript entry is %%=v(@Latest_Purchase)=%%. It is calling a value from a variable I have created using AMPScript to call a value from a different Data Extension. The look up is held in the script header and is formatted similar to this:
%%[
var @Latest_Purchase
set @Latest_Purchase =Lookup(‘PurchaseDE’,’Latest_Purchase’,’ContactId’)
]%%
I created the variable I wanted to call in the message as a variable (var….). I then set the value in the variable by looking up my PurchaseDE Data Extension and looked for the Latest Purchase information according to the ContactID I had in the Data Extension I am sending the emails to.
The Third AMPScript entry is a variable that returns a Date Function.
%% var @todaydate set @todaydate = Now() set @todaydate = FormatDate(@todaydate,”Y”) %%
A short and sweet intro!
And then the technical bit! 🙂
The script is processed at the point it is rendered whether in preview or through an AMPScript call at the end of the email send on a subscriber by subscriber basis. It is rendered Server Side rather than Client Side.
Read more on The AMPScript Guide!