Salesforce Marketing Cloud, SFMC Tips & Tricks

Proof multiple template variants in SFMC

Proof multiple template variants in SFMC

When working with dynamic email templates that can generate multiple unique variants of the email, you are most probably tasked to proof all the variants to your stakeholder for review.

Create data extension

When proofing email templates, traditionally, we select subscribers from production or testing data extensions used in the actual send. This process involves proofing each template individually, changing the subject line for distinction based on language, country, or other segmenting fields altering the email copy.

Here’s a more efficient approach:

Firstly, set up a testable, sendable data extension to store proofing records. Create a CSV file with the required column names, and add data; typically, it mirrors the structure of the data extension used as the target population for the email campaign in which the template is utilized.

Salesforce Marketing Cloud - Testable and sendable data extension settings

A good practice is to store these testable data extensions in a defined folder, simplifying proofing and ensuring centralization for easy access by any future campaign manager.

Sending proofs in one batch streamlines the process, removing the burden of searching for correct records in production or UAT data extensions suitable for a specific delivery template variant.

Add personalization AMPScript

%%[
  IF _IsTestSend THEN
      SET @sl = Concat(  Uppercase(@Country), " ", Uppercase(@Language), " ",  Uppercase(@Segment), " ", Uppercase(@Audience), " ",  "]:", @subjectline)
  ENDIF
]%%

This AMPscript snippet is used in the context of an email send and is checking if the email is a test send (_IsTestSend is a system variable or rather called personalization string by salesforce, that is true if the send is a test).

If the condition is true (meaning it’s a test send), the AMPscript sets a variable @subjectline using the Concat function. This variable is a concatenation of various values, including:

  • Uppercase(@Country): The uppercase version of the @Country variable.
  • Uppercase(@Language): The uppercase version of the @Language variable.
  • Uppercase(@Segment): The uppercase version of the @Segment variable.
  • Uppercase(@Audience): The uppercase version of the @Audience variable.
  • “]:”: A string that separates the concatenated values.
  • @subjectline: The value of the @subjectline variable.

So, it’s essentially creating a string that combines these variables and strings, and the resulting string is assigned to the @subjectline variable. This kind of dynamic subject line modification is often used in test sends for easier identification and tracking during testing phases.

Variable @subjectline contains templates subject line set dynamically depending on the segment or language. Subject line is displayed by following snippet set to email template properties.

%%=v(@subjectline)=%%

Proofing the template

Now, let’s proceed to proof our multivariant template. Open the template and go to the Preview and Test section.

In the Test send tab, choose Test data extensions and select the data extension created for this email template in the previous step.

Salesforce Marketing Cloud - Preview and Test email using test data extension

Set the subject prefix to the email template name or a descriptor understandable to your stakeholders. Our AMPScript will dynamically incorporate segment codes and language during the send process.

Salesforce Marketing Cloud - Adding subject line prefix to test email

If you use Adobe Campaign or are just curious, you can read the same article for guidance on proofing multiple variants of an email template and add variant to subject line of such proof email.

Oh hi there 👋
I have a FREE e-book for you.

Sign up now to get an in-depth analysis of Adobe and Salesforce Marketing Clouds!

We don’t spam! Read our privacy policy for more info.

#AMPScript #email template #programming
Marcel Szimonisz
Marcel Szimonisz
MarTech consultant As a marketing automation consultant, I specialize in problem-solving, process automation, and driving innovation for clients' marketing platforms.

I hold certifications in Adobe Campaign v6 (3x certified) and Salesforce Marketing Cloud (5x certified), as well as 1x Salesforce Associate certified.

Moreover, I serve as a community advisor for Adobe Campaign, providing expert insights and guidance.

Beyond my professional pursuits, I explore various programming languages, CMSs, and frameworks, enhancing my technical expertise and staying at the forefront of industry advancements.
Take a look at our subscription offering in case you are looking for a Marketing Automation Consultant.

Leave a comment

Your email address will not be published. Required fields are marked *

Similar posts that you may find useful

Salesforce Marketing Cloud Tips
Salesforce Marketing Cloud, SFMC Tips & Tricks

How to query filtered data extension

less than a minute read

Easy way to segment your data is to use filtered data extension. Here we can use user interface to set up conditions as we like. When you want to add this newly filtered data extension to the SQL activity you will find that data extension cannot be found in the file browser. But it is […]

Continue reading
Salesforce marketing cloud how to run an automation in a loop
Automation studio, Salesforce Marketing Cloud

How to Run an Automation in a Loop

2 minutes read

As many of us are aware, automation in the Salesforce Marketing Cloud can only be scheduled to run at minimum once per hour. While this frequency may suffice for most automations created within the Automation Studio, there are instances where we may require an automation to run continuously, immediately after it completes its previous run. […]

Continue reading
How to JavaScript in SFMC
Marketing Automation, Salesforce Marketing Cloud

JavaScript in Salesforce Marketing Cloud

3 minutes read

Salesforce Marketing Cloud uses JavaScript where a advanced customization is needed e.g. automations, cloud pages and even in message personalization. Last time we discussed how to JavaScript in Adobe Campaign, we discovered that it utilizes an older version of ECMAScript. However, it’s worth noting that Salesforce Marketing Cloud (SFMC) goes even further back and employs […]

Continue reading
SFMC tips and tricks
Marketing Automation, Salesforce Marketing Cloud, SFMC Tips & Tricks

The Power of Send Log in SFMC

1 minute read

Send log in Salesforce Marketing Cloud is a feature that allows you to track the delivery, open, click, and other engagement metrics for the emails that you send from your account. This feature helps you to gain insights into the performance of your email campaigns and optimize them for better results. When you enable send […]

Continue reading
Salesforce Marketing Cloud Tips
Marketing Automation, Salesforce Marketing Cloud, SFMC Tips & Tricks

How to use MD5 in SQL and AMPScript

1 minute read

Message Digest 5 (MD5) is a hash function used for data integrity, but it is not suitable for security-critical applications. It has found use for various applications, one of which is to create an encrypted contact subscriber key. MD5 takes any string and produces a fixed-size (128-bit) hash value, that cannot be easily decrypted. To […]

Continue reading