Dynamic content: how to personalize an email

For several years now, the top three most effective email marketing strategies have been consistent: customer base segmentation, trigger emails, and personalization. We've discussed audience segmentation and launching trigger campaigns previously. In this article, we'll focus on personalization, specifically demonstrating how to personalize an email within Altcraft Platform.

What is personalization

Personalization involves providing users with relevant content based on data the company knows about them. The open rate for personalized emails is 82% higher than non-personalized ones, and the CTR is 75% higher.

If you haven't dealt with personalization yet, start small by addressing subscribers by name. Gradually, you'll learn to build logic for more sophisticated personalization, altering entire blocks of email content within a single campaign. For instance, if a user visits a Huawei smartphone page multiple times on an online store, you can send them an email featuring a selection of products from that manufacturer.

How to personalize an email

In Altcraft Platform, variables are used for personalization. Variables are dynamic content that changes based on the recipient. How does it work? You insert a variable into the message template and launch the campaign. Subscribers receive an email where, instead of the variable, they see relevant content (such as their name, city, a block of products of interest, etc.).

To add a variable to the message, navigate to the HTML editor of the templates. Place the cursor where you want to insert the variable. On the toolbar, click the </> icon. A list of all available variables will appear. Choose one of them.

Adding variable to email in editor

Variables are written in curly braces — {lead._fname}. Gradually, you'll memorize commonly used variables and be able to manually insert them.

Dynamic variables

Let's go through a few substitution examples.

Substituting simple variables

As the heading suggests, it's straightforward. You select the variable and add it to the template. The recipient of the email will see their data in place of the variable.

For instance, you've set up a trigger to send a welcome email to a new subscriber. As a token of appreciation for their subscription, you're giving them a promo code.

The message template needs to generate a unique greeting and promo code automatically for each customer. To achieve this, add the name variable — {lead._fname} and the promo code variable — {loyalty.welcome.promocode}.

Personalized email configuration in editor

Now, when the campaign is sent, each subscriber will receive an email where they will see their own name and unique promo code.

Personalized email viewed

Below is a list of the primary variables that can be used for straightforward substitution:

VariableDescriptionHTMLView
{lead._fname}Standard field: "Name"We're glad you're with us, {lead._fname}!We're glad you're with us, Carrie!
{lead.email}Recipient’s emailThe email {lead.email} is linked to your account.The email janedoe@example.com is linked to your account.
{resname}Resource’s nameThank you for subscribing to our “{resname}” newsletter!Thank you for subscribing to our “Weekly Digest” newsletter!
{loyalty.welcome.promocode}Promo codeHere’s your promo code for your first purchase: {loyalty.welcome.promocode}.Here’s your promo code for your first purchase: BWYL-1372-ELHF.
{format datenow "%Y-%m-%D %H:%M:%S"}Formatted dateMessage sent {format datenow "%Y-%m-%D %H:%M:%S"}Message sent 2022-06-27 12:16:23

Sometimes, you might want to send a personalized email, but not all subscribers have a specific variable. In such cases, you can insert a default value instead of the variable. Move to the 'Content' block at the bottom of the page. This block appears only when you use variables. Enter the phrase that users will see in place of the variable.

For instance, if you address the subscriber by name, if the name is known, they'll see 'Hello, dear John!', if not – 'Hello, dear customer!'

If subscriber doesn’t have a variable

Switching blocks using logical expressions

Now, let's learn how to change entire content blocks based on subscriber data. To do this, use the if…else logical expression. To add it to the template, in the list of variables, select Logical expressionsSimple condition.

Switching blocks via logical expressions

The following code is added to the editor:

{if "par1"}
    if true
{else}
    if false
{end}

Suppose we want to show one product set for male audience, and another one for the female audience.

A campaign by Adidas in the account of the actress Irina GorbachovaA campaign by Adidas in the account of the actress Irina Gorbachova

A campaign by Adidas in the account of the  blogger Natalia OsmanA campaign by Adidas in the account of the blogger Natalia Osman

To achieve this, we need data on the gender of the profile, stored in the database field "sex." In the previous step, we determined how to access this field in the database — "lead.sex." If the value in this field is "Male," we insert one part of the HTML code; if the value is "Female," we insert another. The 'equal' operator checks for equality.

{if lead._sex equal "Male"}
    // Products for the male audience
    // ...html...
{end}

{if lead._sex equal "Female"}
    // Products for the female audience
    // ...html...
{end}

{if lead._sex not_in array["Male" "Female"]}
    // Products for the unknown audience
    // ...html...
{end}

Note the last block. It's used when the profile's gender is unknown. Here, popular product selections can be displayed to these subscribers. To configure such personalization, use the logical expression “Element not in the array” — “notin array[].” If the values in the “sex” profile field do not match any values in the array (“Male” and “Female”), the third block of products will be shown.

Conclusion

This article covered the basic functions and variables of the Altcraft Platform. For further details, consult our documentation.

You may be interested