ePrivacy and GPDR Cookie Consent by Cookie Consent Skip to main content

Personalizing Email Content with CDP Attribute Data

Personalization is a crucial aspect of effective email marketing. By tailoring your emails to your recipients' needs, interests, and issues, you demonstrate that you understand them and want to help them. Personalization in Email is supported in:

Subject and preheader personalization

In email marketing, capturing the attention of your subscribers relies on three crucial elements: the sender name, subject line, and preheader. 

Using the attribute picker, you can easily reference specific customer information and create subject and preheader lines tailored to each recipient.

Знімок екрана 2023-05-22 о 16.06.09.png


Personalizing emails with dynamic content

Dynamic content with Email Visual Builder

The attribute picker is a feature in the Email Visual Builder that allows you to search for and select specific attributes for personalization purposes. You can use both single-value and multi-value attributes to personalize your email content. For example, you can use the customer's name, location, or past purchase history to create personalized content.

To use the attribute picker, simply click on the attribute picker icon, which will display a list of all available attributes you can choose from. You can then select the attribute you want to use, and it will be inserted into your email content. 

Remember: An empty string will be inserted if the attribute is not known for a particular customer. To avoid sending empty strings, it is advisable to segment your audience based on the attributes that are known or use default values for specific attribute.

Adding personalization to text

To personalize the text content, simply click on the attribute picker icon, which will display a list of all available attributes you can choose from. You can then select the attribute you want to use, and it will be inserted into your email content. When the email is rendered, the attribute will be replaced with its corresponding value from the customer's profile, if available. 

May-09-2024 15-34-46.gif

Adding personalization to image

By using attributes that hold image URL dimensions, you can tailor your email content with personalized images in emails.

Simply click on the attribute picker icon, which will display a list of all available attributes you can choose from. Using dynamic product URLs in your email campaigns allows you to display the exact products that the recipient has expressed an interest in, increasing the likelihood of a conversion. 

Warning: it is necessary for the attribute used in the image to hold the image URL; otherwise, the recipient may receive an email with a broken image.

Adding personalization to button

Access the attribute picker from the configuration settings tab to personalize the button. From there, you can select the desired attribute, which will be inserted inside the button. When the email is rendered, the attribute will be replaced with its corresponding value from the customer's profile, if available. 

May-22-2023 12-44-27.gif

Adding default values to single values attributes

It is possible that users may or may not have a specified value for some attributes. If no default value is specified, the value will not be displayed. To set a default value, use the "default" field in the text block and type in any value you want the user to receive in case there is no known value for the attribute.

May-09-2024 15-56-58.gif

Dynamic content with multi-value compound attributes

How to add iterations to content blocks?

Iterations can effectively solve various use cases, including displaying recently viewed products, highlighting abandoned baskets, suggesting recommended products, or replenishing products. Iteration enables you to dynamically populate the content of a block with data from a data source. 

Data source

In the data source field, refer to the ID of the multi-value attribute stored under the Data Library/Attributes tab or the Administration/Attributes tab.

Item name

the name that will be used to refer to each item in the data source. For example, if you use a product catalog as your data source, the item name might be "product" or "item."

Limit

the maximum number of items that will be displayed in the text block. If the data source contains more items than the limit, only the first n items will be displayed.

Mock quantity

setting that can be used for testing or previewing the text block. It allows you to display a specified number of items in the text block, even if the data source contains fewer items.

To demonstrate the usage of iteration, follow these steps:

1. Enable iterations using a toggle for iteration.

2. In the data source field, insert the ID of the multi-value compound or non-compound attribute. For instance, it could be forms_submitted or all_products_purchased (note that these examples are provided for illustration purposes and will differ from the attribute IDs in your CDP).

3. Specify the item name that you will reference within the iteration (e.g., "product," "item")

4. Set the limit and mock quantity fields according to your requirements.

5. To incorporate the multi-value compound attributes into your email content, use the item name followed by the dimension ID of the attribute enclosed within curly brackets. For example, {{item_name.dimension_id}}. In the case of non-compound multivalue attributes that do not have dimensions, you can refer to the attribute in the email content by using double curly brackets with the item name (e.g., {{product}}).

Assuming you have this multiple compound attribute and its attribute ID and dimension ID are:


Your configurations for using iterations to blocks might appear as follows:

Iterating Column Blocks

Using iterations, you can dynamically populate column blocks and their children, such as product images, names, prices, and more. Follow these steps to achieve this dynamic content display:

  1. Begin by adding a column block to your content page.
  2. Populate the column section with image and text elements or any other content required.
  3. Go to the Layer section and locate the column block. Click on it to access its configurations. 
  4. Determine the number of columns needed and set the width of the column block accordingly (e.g., set 33% for a three-item limit).
  5. At the bottom of the column block configurations, enable iteration. Fill in the data source field, item name, limit, and mock quality fields the same way as described above.
  6. Go to the column children section and fill them with attributes iterated using the item name followed by the dimension ID of the attribute enclosed within curly brackets. For example, {{item_name.dimension_id}}.
  7. Check the preview of the email to see how your email will look with the iterated columns.
  8. Send a test email to ensure the personalized content is populated correctly on various email clients and devices.

Nov-14-2023 10-32-28.gif

Adding default values to multi-value compound attributes

It is possible that users may or may not have a specified value for some attributes. If no default value is specified, the value will not be displayed. To set a default value, use the "if" condition in the content block. 


Personalization in HTML Builder with liquid tags

If you choose to use the HTML builder, you can leverage liquid tags to personalize your email content. The Liquid is an open-source templating language that allows logical operators to control how to include content from the CDP attributes in your email templates. 

To create your message using liquid tags, you can declare the tags in the content editor. There are two types of tags you can use - output and conditional tags.

Output Tags

Output tags are used for displaying the attribute’s value. 

Let's say you want to create a personalized greeting for each recipient, including their name and country. You can use Liquid tags syntax to display the values of the name and country attributes in your message.

To customize the content of your emails, you can utilize attribute IDs, e.g. web_first_name and web_country_login (please note that these are examples and may not correspond to the actual attribute IDs in your specific CDP). By incorporating these attribute IDs into your email template as placeholders, you can create personalized greetings like "Hello {{web_first_name}} from {{web_country_login}}." When the email is sent, the placeholders will be replaced with the corresponding values of the first name and country attributes for each recipient. This will result in a tailored greeting, such as "Hello John from the United States."

Conditional Tags

Conditional tags allow you to provide attribute values for different conditions. The syntax for these tags depends on the type of condition:

  • If statement: for example, you want to offer a discount to customers who have previously made a purchase. To do this, you can use an if statement to check if a customer has made a purchase before and offer them a discount if they have. For instance:
{% if web_all_purchases_comp.quantity > 0 %}
<p>Thanks for shopping with us before! As a thank you, here's a 10% discount code: DISCOUNT10</p>
{% else %}
<p>Welcome to our store! Sign up for our newsletter to receive exclusive discounts and promotions.</p>
{% endif %}

In this example, we're checking if the customer has made any purchases, and if the quantity is greater than 0, we offer them a discount code. If not, we welcome them to the store and encourage them to sign up for the newsletter.

  • For loop statement: for example, you want to display a list of all the products on sale, which is a multi-value compound attribute. You can use a for loop to iterate through all the products, check if they have a sale price, and display a list of all the products currently on sale. For instance:
<h2>Products on Sale</h2>
<ul>
{% for product in web_products_added_to_cart %}
  {% if product.price < product.compare_at_price %}
    <li><a href="{{ product.url }}">{{ product.title }}</a> - {{ product.price | money }} (was {{ product.compare_at_price | money }})</li>
  {% endif %}
{% endfor %}
</ul>

In this example, we're using a for loop to iterate through all the products in the store and check if they have a sale price (i.e., if the current price is less than the original price). If a product has a sale price, we display its title, sale price, and original price in a list.

Remember: In Liquid syntax, attribute names are referenced directly by their names rather than using curly brackets.

Remember: The examples of attributes presented in the article are provided for illustrative purposes only, and their IDs and dimensions will differ from those in your CDP.

Adding default values

It is possible that users may or may not have a specified value for some attribute. If no default value is specified, the value will not be displayed. In order to specify a default or fallback value, use the following syntax: {{attribute | default: "some value"}}. For instance, if you have a field that says "Dear {{customer_db_name | default: "customer"}}" and the user has a value for this attribute (e.g., Ben), the personalized content will read "Dear Ben". However, if the user does not have this attribute's value, it will be delivered "Dear customer".


In conclusion, the use of personalized content in marketing has proven to be a powerful tool for businesses to connect with their audience and achieve better results. By leveraging conditional tags and personal attributes, marketers can deliver tailored messages to improve key metrics.

Learn more: about the liquid syntax