Skip to main content
Every email you send from Loops can contain dynamic content connected to the contact you’re sending to or the event that triggered the email. A common example of using dynamic content is to personalize an email greeting by using a contact’s first name, or by including a customer’s plan details in a subscription reminder.

Types of dynamic content

The three email types in Loops have different dynamic content available to them:
  • Campaign emails can contain contact properties.
  • Emails within Loops can contain contact properties and event properties.
  • Transactional emails can contain data variables.
The three types of dynamic content are:
  • Contact properties are pieces of data related to each contact in your audience. There are a set of default properties like name and source, but you can also add any number of custom contact properties. If you sync contact data to Loops with the API, an integration or with CSV uploads, you can include that data in your email.
  • Event properties are pieces of data that can be sent along with every event (which are used to trigger loop emails) via integrations or API calls.
  • Data variables are pieces of data included in transactional emails, which are populated in the API call. You can utilize optional data variables to make your transactional emails more dynamic.

Add dynamic content to emails

If you want to add dynamic content to a custom MJML email, check the Dynamic tag syntax section below.
To add dynamic content to your emails, type ”{” anywhere in the editor or click the {} dynamic content icon in the email editor toolbar. Using either of these options will open the dynamic content menu, a filterable list of all available properties you can insert. Dynamic content menu appearing after typing the opening brace Adding a contact property These two options are also available in all of the sending setting fields above the editor. An icon appears on the right when you hover over each field, or you can start typing ”{”. Adding a contact property to sending details Depending on whether you’re editing a campaign, loop or transactional email, the menu shows different content based on your email type (explained above). To use the dynamic content menu
  1. Type { or hit the {} icon in any editor field
  2. Continue typing to filter results: {fir shows “firstName”
  3. Use ↑/↓ to navigate, Enter to select, Escape to close
When the email is sent, the dynamic content will be replaced with actual values from the contact, event or data variable. Once you’ve selected something from the menu in a campaign or loop email, you will be prompted to enter a fallback value. This ensures emails still send even when data is missing.
If you send an email and the dynamic content is missing a value, the email will not be sent. Make sure to add fallback values to avoid missed sends. Read more below.

Fallback values

Fallback values are important for campaign and loop emails. If a contact doesn’t have a value for a property, or an event property is missing, the email won’t send. When you insert a contact or event property using the dynamic content menu, you’ll be prompted to enter a fallback. This default text ensures your email still sends even when data is missing. Fallback input appearing after selecting a property Common fallback examples:
ExampleFallbackResult
Hey {firstName}thereHey there
Welcome to {companyName}your companyWelcome to your company
This keeps your emails feeling personalized even when specific data isn’t available. Your fallback is saved and will auto-fill if you insert the same property again. You can edit the fallback value later on from the editor panel.

Data variables in transactional emails

In transactional emails, dynamic tags work slightly differently: you can create new data variables in your email as you type. Creating a new data variable with the dynamic content menu
  1. Type {orderTotal (using a new name that doesn’t exist).
  2. Select Create “orderTotal” from the menu or press Enter.
  3. The variable is created and you can edit it from the editor panel (change the name or change to an optional variable).

Dynamic tag syntax

As well as using the dynamic content menu, you can write dynamic content “tags” directly in the email body. This is especially useful when uploading custom emails. These tags are the only way to add dynamic content in custom MJML emails.

Contact properties

If you have a custom contact property named teamName that you want to add to a campaign, you can write it surrounded by curly brackets in the email:
{teamName}
When the email is sent, the teamName value for each contact will be added to the email. For a list of all of your contact properties, visit the API Settings page. The API Name is the name you use within the brackets in your email, for example {firstName}, {lastName}, {email}, etc. Contact properties table

Event properties

To add dynamic data to emails within loops using event properties, the tag requires an EVENT_PROPERTY: prefix:
{EVENT_PROPERTY:firstName}

Data variables

To add data variables in transactional emails, the tag requires a DATA_VARIABLE: prefix:
{DATA_VARIABLE:firstName}
It is important to use the right names in your tags, for example contact property names from API settings and event property names from the Events settings page. If you have any questions about how to format your tags, reach out to us!
I