A guide to conditions and loop elements in dynamic emails

Transactional emails are emails prepared and sent by brands to their customers upon a series of events. They are automated emails sent after a trigger made by the customer.

Triggers can be a purchase, a response to a survey, an abandoned cart, a visit to a page on the company’s website, or any other customer behavior event determined by your marketing team.

All transactional emails communicate to the customer a set of information specific to them: personalized information.

To create personalized transactional emails, your email team needs to use conditionals and looping elements. In this guide, we will explain the difference between conditions and loop elements. And how you can easily incorporate them in your transactional emails – no coding needed.

Conditionals

Conditionals, or if-else elements, are used to display specific information about a customer based on a set of variables.

If customer fits description X, then show them information A.
If else, show them information B.

Conditional elements can be used to test which promotional offer performs better. They can also be used to distinguish between customers belonging to different segments.

For example, customers who have answered a company survey will receive a “Thank you” message. Whereas customers who have not answered would receive a “Hope to get your feedback next time” message.

You can also follow your customer’s internet browsing behavior. Based on their navigation history on your website, you can personalize your emails.

For example, if a customer checks out the same product page multiple times in the past 7 days, you can trigger an email that offers them an exclusive discount on that item.
The email can also show them similar items to the product in question.

Another use case for if-else elements is based on the subscriber’s gender.
Nike used this method to display different product images based on the receiver’s specified gender. You can see the difference in both emails sent exactly at 3:16 am.

Version 1. Air Jordan I High Zip ‘Black’

Air Jordan I High Zip 'Black'

Version 2. Air Jordan I

Air Jordan I

How to add conditionals in your emails?

You can create conditional elements in Chamaileon easily and without any coding.

1. Start by designing the email block that will be used in the conditional element. You can design and save it in your email folder.

2. Next, drag and drop a conditional element from the left side panel.

drag and drop a conditions

3. In the Blocks section, find your saved block and drop it inside the conditional block.

saved block

4. Now we will start setting up our conditional rules.

In the right-hand panel, write your first conditional rule:

If continentAmerica
Then → subscribers will see the first content block you’ve just inserted.

first if

Next, we’ll add our second conditional rule. To do so, click on Add new branch.

add new branch

A new conditional rule will appear. You can either choose :

  • Else if: if you want to specify a second condition. In this case, we want to add

→ Else if continentEurope
Then, we show the second content block

  • Else: if you want to show a content block for any subscriber that doesn’t fit in the first rule.

In this case, no need to add an expression. The third content block will appear for all subscribers who are not in continentAmerica and are not in continentEurope.

When you click on each condition, the corresponding content block appears. All you need to do is drag and drop the block you saved, and make the necessary edits.

continent eu content

As you can see in the example above, we changed the destination from Canada to Norway for subscribers living in Europe.

Loop elements

Loops display user-specific data again and again. They are also called iterations. Loop elements are frequently used in order confirmation emails or other transactional emails that showcase the same information repeatedly.

Order #65005 confirmed

order-65005-confirmed

Source

Here’s another example of a loop element in action: this brand used the dynamic email block to show their customers images, prices, and names of products they might be interested in.

Don’t miss out on your birthday treat

brandalley-uk-limited-dont-miss-out-on-your-birthday-treat

Dynamic email content: conditions and loop elements

Dynamic email content is email blocks that can be changed or personalized according to a set of conditions, data, or behaviors. Personalized emails have higher open and conversion rates.

Brands utilize the data they collect from and about their subscribers in dynamic emails. The most frequently used dynamic emails are transactional emails: order confirmation emails, purchase orders emails, welcome emails, and even password reset emails.

Forgotten Something?

look-fabulous-forever-forgotten-something

How to create dynamic emails?

Of course, the first thing you need to create dynamic email content is collecting pertinent, usable data on your subscribers.

Collect customer data

You can collect customer data using sign-up forms, incentivized surveys, or simply directly asking your customers about their information.

You can see from this email example that this brand asks its customers to provide their birth dates, by tempting them with birthday gifts.

Get a Birthday Gift on Us!

luckyvitamin-get-a-birthday-gift-on-us

Design dynamic email blocks

Once you collected all the information you might need from your customers, it’s time to embed them in your transactional (and maybe even marketing) emails.

Usually, email developers spend days coding transactional emails using conditionals and if-else elements. Marketing teams then test them with different scenarios and on all major email clients. Iterations take days after that, and mistakes will eventually occur.

We suggest using our bulletproof method to create dynamic emails: Chamaileon’s advanced settings.

Our no-code solution helps email marketers regain total control over their email creation process. With zero coding involved, marketers can focus on email messaging and let their creativity take over.

Discover more about our no-code solution to adding conditions and loop elements in your emails. Start your free trial today!