Personalization techniques for SFMC from Marketing Champions

Personalization techniques for SFMC from Marketing Champions

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

  • Contact Count: Monitoring and Data Cleansing

    Have you already heard about “Contact Limit” or “Contact Count” within Salesforce Marketing Cloud? Or have you been contacted by your Account Executive because you exceeded the allocated amount of contacts? What is a Contact Count, and how do we manage it? This article will tell you everything you need to know. What is the […]
  • Connecting data through Contact Builder

    Marketing Cloud Connect and Contact Builder What is Marketing Cloud Connect (MC Connect)? MC Connect helps you synchronize your CRM data from Sales Cloud or Service Cloud to your Marketing Cloud. You do this through synchronized data sources, where you define which CRM “objects” (accounts, contacts, etc.) need to sync to Marketing Cloud. These objects […]
  • What does Contact Builder consist of?

    Data Designer Data Designer is probably the primary tool in Contact Builder. You use this tool to view and manage contact data, aggregate a contact’s demographic and behavioral data, and define how that data relates to a contact record. Businesses use the combined data to enrich the customer experience and serve them better.  (An overview […]
  • How to manage contacts in Contact Builder

    Manual contact creation in Contact Builder Imagine you’re testing an email for a future campaign and would like to send a test email to a test contact. At this point, you might wonder if it is possible to create contacts in Contact Builder manually. Yes, you can. When you create a data extension in Contact […]

Stay Connected

Stay Connected

Subscribe to the Newsletter
Receive Salesforce Marketing Cloud tips,
tricks, and DESelect updates

By clicking the “Subscribe now” button, you agree to the DESelect Terms of Use and Privacy Policy.