Personalization techniques for SFMC | DESelect
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.
- AMPscript.
- Einstein.
- 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:
console.log( %%[
Set @subkey = _subscriberkey
/* Check if this is a preview rendering */
if _messagecontext == "PREVIEW" then
set @PromoCode = "TESTCODE"
else
/* 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")
else
/* 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)
endif
endif
/* This could pull expiration date if present */
SET @ExpirationDate = Lookup("ExampleCampaignPromoCodesDE","ExpirationDate","Subscriberkey", @subkey)
endif
]%%
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.
Conclusion
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.
Latest Articles
-
Top 10 Marketing Operations Predictions for 2025
We’re excited to unveil our Top 10 Marketing Operations Predictions for 2025. The exponential growth of marketing automation, the impact of AI on strategy and execution, and the drive to become more intentional and data-driven means we’re going to see a lot of interesting dynamics and progress in marketing. As 2024 closes out, we took a step back to think about what the future holds for marketing operations and came up with our first-ever list of predictions. Let’s dive in!December 19, 2024The Ultimate Guide to Salesforce Marketing Cloud Advanced Edition
At the Marketing Keynote at Dreamforce 2024, Salesforce announced an exciting expansion to its suite of marketing solutions — the Marketing Cloud Advanced Edition, which builds upon the existing Marketing Cloud Growth Edition and offers even more powerful tools to help small and medium-sized businesses (SMBs) engage their customers in a more personalized and efficient way. This article explores the features, benefits, and impact of Advanced Edition and what it means for SMBs striving to innovate.September 19, 2024DESelect Segment vs Audience Builder: Which Salesforce Marketing Cloud Solution to Choose
DESelect Segment VS Audience Builder Audience Builder Sunset: DESelect Segment for Marketing Cloud Segmentation Create audiences without the need for code through DESelect Segment Learn more → Case Study: Boozt Boozt turned to DESelect Segment to perform their segmentation after moving from Audience Builder and SQL queries. The results: Technical marketers save 15% […]July 1, 2024Unlocking the Potential of Salesforce Data Cloud: A Comprehensive Guide
Introduction to Salesforce Data Cloud In recent years, Salesforce has been making a strong push into the Customer Data Platform (CDP) space with Salesforce Data Cloud. Data Cloud enables businesses to manage and leverage their customer data across multiple touchpoints, enabling marketers to leverage their data better than ever. By bringing together data from various […]June 13, 2024