Personalization is critical for any successful marketing campaign, so in our hunt for more pro tips, we asked a couple of experts to share some of their personalization techniques for SFMC. Here’s what they had to say.
Swati Bhalla, Sr. Specialist Email and Digital Channel at Salesforce
Personalization in SFMC is something every marketer dreams of, and we have many ways to personalize content and reach your audience at the right time with the right message.
Here are just a few personalization tools at your disposal:
- Personalization string.
- Dynamic Content module.
I want to focus on the Dynamic Content module and how it helped me increase an open rate by 27% (and CTR by 4%) in just 30 days.
What is a dynamic content block?
A content block allows you to tailor your email campaign so that different contact groups receive different content, specific offers, images, copy, or calls to action. For example, you can send one campaign with multiple targeted messages for various customer groups.
How I used it
We were running a loyalty program campaign where all the members received similar content despite their loyalty level (e.g., whale, elephant, rhino. etc.)
We used a dynamic content block to tailor the content based on each loyalty level, personalized images, the sender’s signature, and subject lines.
We also used Einstein features for the campaign to understand the best open time for our audience, thus targeting them better.
Having witnessed great results, we are now scaling it further by using the new SFMC feature – released trigger campaign messages. I’ve always been a fan of Journey Builder, and now, with this cool feature, I can target my audience based on their preferred channel by analyzing real-time data.
Ben Briggs, Solution Lead at Lev
Automating Serialized Coupon Codes
Regarding promo codes in emails, it’s ideal to have a proper integration between your commerce platforms, such as Salesforce Commerce Cloud and Salesforce Marketing Cloud. This way, you can push personalized promo codes directly into Marketing Cloud on a 1:1 basis.
While that’s not always practical, you don’t have to settle for giving everyone the same “WELCOME20” promo code and lose all redemption tracking and the impact of serialized codes.
In such situations, the claimrow function in AMPscript is particularly handy. This simple AMPscript function allows you to assign serialized promo codes for bulk importing.
There are many ways of achieving similar results, but I usually start by creating two data extensions:
The first data extension will hold all promo codes, regardless of redemption status. The promo code field will be your primary key. This data extension should never be overwritten or purged. It must have a ‘Claimed’ or similar boolean field that will flip to True as each code is claimed by the AMPscript while logging the code claim date/time and the associated SubscriberKey. This is the data extension that the AMPscript will both pull from and update to.
The second data extension will hold only those codes that are unclaimed/active. This data extension is not critical for sending promo codes, but it allows us to trigger automated alerts when the volume of active codes drops below a certain threshold.
The first data extension would be populated by two sources:
- Import automation that’s triggered by your promo code file. This could be as simple as a single-field PromoCode add-only import.
- The claimrow AMPscript will update each PromoCode row as codes are claimed. This ensures that we don’t send the same code to multiple recipients while also allowing us to lookup an individual’s existing assigned code for use in reminder emails – rather than sending them a new code each time.
The second data extension is populated by a query. A simple query, pulling all records from the PromoCode DE where ‘Claimed’ does not equal True, as we want a count of all active codes.
The next step in this automation is a verification step, set to send an alert to the individual who manages the codes. For example, sending an email alert that the count of active codes has dropped below 15,000.
The last piece of the puzzle is the AMPscript. As mentioned above, this code does more heavy-lifting than simply pulling a value from a data extension field.
Here’s an example of how this might look:
Set @subkey = _subscriberkey
/* Check if this is a preview rendering */
if _messagecontext == "PREVIEW" then
set @PromoCode = "TESTCODE"
/* Check if this subscriber already has a code assigned for this campaign */
SET @PromoCode = Lookup("ExampleCampaignPromoCodesDE","PromoCode","SubscriberKey", @subkey)
IF Empty(@PromoCode) THEN
/* Subscriber does not already have a code assigned so we claim one */
set @PromoRow = ClaimRow("ExampleCampaignPromoCodesDE", "Claimed", "Subscriberkey",@subkey)
if not empty(@PromoRow) then
set @PromoCode = Field(@PromoRow, "PromoCode")
/* No unclaimed codes exist so we log the error and stop the send */
InsertDE('ExampleCampaignPromo_RaisedErrorLog','SubscriberKey',_subscriberkey, 'Email',emailaddr, 'ErrorMessage','No promo code was located','EmailName',emailname_)
RaiseError('No promo code was located',false)
/* This could pull expiration date if present */
SET @ExpirationDate = Lookup("ExampleCampaignPromoCodesDE","ExpirationDate","Subscriberkey", @subkey)
Here is your promo code: %%=v(@PromoCode)=%%
It expires on %%=v(@ExpirationDate)=%%
'Code is Poetry' );
This process takes more time than hardcoding “WELCOME20” into your email and calling it a day. But it provides the benefits of serialized promo codes in email without many typical hurdles.
Want to take it a few steps further?
In the example above, we check if the ClaimRow function successfully retrieves a previously unclaimed row. We do this by ensuring that @PromoRow is not empty. In cases where @PromoRow is empty, we utilize the RaiseError ampscript function. This allows us to halt the entire deployment or skip the current subscriber. In this case, we have elected to halt the entire send. We are also logging the error to a data extension (‘ExampleCampaignPromo_RaisedErrorLog’).
Open tracking has always been tricky as it relies on a rendered tracking pixel and has become less reliable with recent privacy settings. An email open also doesn’t guarantee that the individual redeemed the code. However, if you can create an extract from your commerce platform of the redeemed codes, then a nightly refresh of your PromoCodes data extension could flip an IsRedeemed boolean for those records. You can use this data to either exit applicable records from the journey or skip any resend/reminder steps.
Speaking of opens, you may not want to chew through your promo codes when previewing your emails in Marketing Cloud. To prevent this, simply nest your claimrow ampscript inside an IF statement that checks whether the _messagecontext == “PREVIEW”, as seen in the example above.
Special thanks to Ben and Swati for sharing their tradecraft. Personalization is a hot topic in marketing, so we remain keen to share actionable advice and tips on getting the most out of it. You might therefore like to read our eBook, How Can You Improve Customer Experience With Personalized Data in Salesforce Marketing Cloud?
We understand the commercial importance of data and marketing. So we wrote this eBook to ease the process of understanding personalization’s nuances and technicalities. The book provides actionable advice regarding the use of personalization by leveraging data. You can download it here.
A+ Marketing Cloud Strategies for HigherEd Success: A Fireside Chat with Cornell and UMGC (Transcript)Anthony Lamot: Hello, and welcome everyone to another webinar by DESelect. Today. We have a really exciting topic getting an a plus with Marketing Cloud strategies for hired success today. The fireside chat. And I’m very excited to have our customers from Cornell University as well as University of Maryland Global Campus here. So let’s […]February 26, 2024
Webinar | State of Marketing Optimization: Top Trends to Get the Most Out of Your Personalization and AI in 2024Anthony Lamot: Hi, everyone, and welcome to this webinar organized by DESelect. Today we’re going to be talking about the state of marketing. Thank you all for joining our webinar, as we are going to take you through some top trends to get the most out of your personalization. And AI for this year for […]February 7, 2024What Is Salesforce Marketing Cloud? A Quickstart Guide Never heard of Salesforce Marketing Cloud or simply don’t know enough? You have come to the right place. Today, we will be discussing the platform in a little more detail, along with the benefits of investing in SFMC for the long-term strategic future. As we embark on […]January 30, 2024Company Culture Meet Our Team: Customer Success Manager, Alex Divrioti Meet Alex, our newest member of the Customer Success Team, who left sunny Greece behind and moved to Belgium to work at DESelect. Get her take on her DESelect journey → Alex has a passion for innovation, change and exponential growth. That passion makes her […]January 24, 2024