Omnisend has many features that help you personalize the messages sent to your readers. These messages can include any data describing the recipient (first and last names, gender, address, etc.) or provide some insights about the order, such as its billing and shipping information.
In this article, you will learn how to add different data about your customers to your email and SMS content.
Before You Start
You can use personalized data for communication in both Campaigns and Automation workflows. However, in contrast to Campaigns, Automations triggered by a specific event can carry information about that event (e.g., an abandoned cart link in the Abandoned Cart flow or a tracking link in the Shipping Confirmation one).
Suppose you set the trigger in the Automation workflow to the Custom Event passed by a third-party application. In that case, the personalization menu will provide an additional category with a list of the custom fields that the event is carrying.
You can add the information about your contacts to all channels:
Email
SMS
Push Notifications
How Does It Work?
Personalized variables can be added as regular text or as a personalized link in various fields, as long as you have a tag option to insert them.
The information can be added to the following pieces of data:
Email message subject line;
Content of the message;
Content Blocks in the Email message.
Once you select the personalization category and the value, Omnisend will automatically place that information in the message you want to send. Just make sure it is available to Omnisend; otherwise, the system will leave it blank, for example:
Hello [[contact.first_name]]!
If the subscriber's name is in our database, the output will be: Hello John!
If the subscriber's name is unknown, the result will be: Hello!
You can also define a specific text (AKA fallback text) that will work as an alternative for an empty value if, for example, your subscriber's name is unknown:
Hello [[contact.first_name|default:'there']]!
If the subscriber's name is in our database, the output will be: Hello John!
If the subscriber's name is unknown, the result will be: Hello there!
Conditional Personalization
You can also add a different text based on each of the values of personalization variables. For example, you can show additional text depending on the country field value:
[% if contact.country == "France" %] Bonjour! [% else %] Hello! [% endif %]
If the subscriber's country in our database is France, the output will be: Bonjour!
If the subscriber's country is different, the output will be: Hello!
💬 If you have used personalization in the email channel before, the old syntax {{name}}
will keep working, but new emails will be created using the new syntax [[contact.name]]
.
Note! Conditional personalization works in Automations only.
Personalization in the Email Message Content Blocks
Personalization can be added to different parts of a single Content block, including the Title, Text, Links, Buttons, etc.
💡 Some event-based Content blocks may have a personalized variable as an inherent property. In such cases, you won't find the personalization tag. For example, the Checkout button in the Abandoned Cart sequence has the abandoned cart link
preset. The personalization tag shown in the screenshot would add the link to the button's name.
Personalization Variables
In the Personalization menu, you will see different categories of personalization variables, including:
Contact;
Account;
Date;
Event (for event-based Automations only).
Contact Variables
The list of the default properties includes the general information taken from your contacts' profiles and custom properties.
[[contact.email]]
[[contact.first_name]]
[[contact.last_name]]
[[contact.city]]
[[contact.country]]
[[contact.state]]
[[contact.phone_number]]
[[contact.postal_code]]
[[unsubscribe_link]]
[[preference_link]]
[[contact.custom_properties.name_of_custom_property]]
If you collect some custom subscribers' information, such as clothing size or loyalty points, you can add it to the content of the message by clicking on the Personalization tag → Contact → Custom properties.
Custom information about your contacts can be collected with Signup forms, Subscriber Preference page, assigned manually, or by an integrated third-party app.
Account Variables
Among the Account variables, you can find the information about your store that you might want to add to the message.
[[account.name]]
[[account.address]]
[[account.city]]
[[account.zipCode]]
[[account.country]]
[[account.timezone]]
[[account.currency]]
[[account.website]]
Date Variables
Here, you can find the information about the email's date. Since your Automated messages can be triggered on different dates and at other times, the time and date when the email was sent will be added to the message content.
Current day [[current_date|date:'%d']]
Current day name [[current_date|date:'%A']]
Current month [[current_date|date:'%m']]
Current month name [[current_date|date:'%B']]
Current year [[current_date|date:'%Y']]
Event Variables
Unlike other variables, you can add event variables to the Automated workflows only. The list of variables will also depend on the type of event in the trigger settings. In general, those might be categorized as follows:
Order variables for the order placed & Order status change triggers;
Abandoned Cart URL variable for Abandoned cart trigger;
Custom variables for Custom event trigger.
💬 Learn more about Custom events and custom fields in the corresponding article.
Use Cases
In Omnisend, you can personalize messages by dynamically adding a contact's first name using Liquid syntax. Here's how you can do it, including adding a comma after the name.
1. Adding a Comma After the Contact's First Name
To automatically add a comma after a contact's first name, use the following syntax in your email content:
luaCopy code[[ contact.first_name | append: "," ]]
This appends a comma immediately after the first name, ensuring that it looks professional and doesn't require manual placement.
2. Capitalizing the Contact's First Name and Adding a Comma
If you'd like to ensure that the first letter of the contact's name is capitalized, even if it's stored in lowercase, you can use the capitalize
filter along with the comma like this:
luaCopy code[[ contact.first_name | capitalize | append: "," ]]
This will capitalize the first letter of the name and append a comma afterward, ensuring correct formatting for your message.
3. Removing Regular Commas
When using this method, make sure to remove any regular commas you might have added manually after the first name in your message. The Liquid syntax automatically handles the placement of the comma, so there's no need for additional punctuation.
Example Scenario
Let’s say you are sending an email campaign and want to greet your contacts by their first name, followed by a comma. You also want to ensure that the first letter of their name is always capitalized.
Email Content with Liquid Syntax
In the email builder, you can use the following code to greet your contacts:
Hi [[ contact.first_name | capitalize | append: "," ]]
, we have some exciting
news for you!
How It Works
[[ contact.first_name ]]
: This pulls the contact's first name from your database.| capitalize
: This ensures the first letter of the name is capitalized.| append: ","
: This adds a comma directly after the first name.
End Result
If a contact's first name is James, the email will display:
Hi James, we have some exciting news for you!
Troubleshooting
If personalization does not transform in sent emails, try deleting it fully and rewriting or re-selecting it. If personalization is edited only in part, it may lose integrity and stop working.
Have more questions? Feel free to contact us at [email protected].
Read other articles like this: Building an Email Campaign, Send Email Campaigns, Creating A/B test Segment for Campaign testing, and A/B Test Campaigns.