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:
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.
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.
Sharing Data Across Business Units: An Overview and Best PracticesSalesforce Marketing Cloud is a powerful platform that enables marketers to create, manage, and execute campaigns across multiple channels. As industries forever evolve, it has become imperative for organizations to stay agile and not fragile. Growth, expansion, restructuring, and so many other factors often create the need for organizations to share data across various business […]May 24, 2023
Marketing Cloud Audience Builder is Being Retired – What’s Next?Marketing Cloud Audience Builder has allowed marketers to create granular segmented audiences based on behavioral and demographic data. So now it is being retired, the question on everyone’s mind is “what’s next?” As with any tool retirement, we need to find a new solution capable of complex segmentation – and we’ve got some options. DESelect […]April 18, 2023
Heroes of Marketing Cloud: Kaleem McGill, Salesforce Marketing ChampionTo be the best, you have to learn from the best. For that reason, we profiled Kaleem McGill, who became one of the illustrious Salesforce Marketing Champions back in 2020. More on this later. Currently an Implementation Specialist, Kaleem has over a decade of experience working with CRMs and Marketing Cloud. We talked to Kaleem […]April 12, 2023
The Greatest Debates in Email Marketing History: Prioritizing Campaigns Without the Email FatigueMarketers rely on subscriber communications as the lifeblood of revenue generation, yet over a quarter of consumers indicate extreme email fatigue from increased campaign exchanges. Add in modern omnichannel experiences and separate marketing teams naturally prioritizing their own campaigns, and it becomes easy for end recipients to drown in an overwhelming flood of communications. Each […]March 23, 2023