Skip to main content

Formatting Personalization Variables for Flash Emails

Learn how to create liquid-based personalization values.

Listrak's Flash Email Builder allows you to personalize messages in a variety of ways using liquid-based coding. In this article, learn how to format the variables in Listrak to display in this liquid-based personalization.

Ways to Personalize Messages

  • Display the Value from a Personalization Field: Display the specific value stored in the field for each contact (e.g.: display a contact's first name)

  • Create Filters for Dynamic Content: Determine if a contact is eligible to see a portion of the message creative based on the value in a profile field.

  • Create a Dynamic Subject Line to show different subject lines if contacts meet certain criteria.



Message Variables

These variables are specific to the message, such as a view in browser link.

💡 If no unsubscribe link is included in your message, the system will automatically include a generic link at the bottom of the message.

Link Type

Personalization Variable

Unsubscribe

{{ message.unsubscribeUrl }}

Change Address (Swap the Email Address Subscribed to Marketing)

{{ message.changeaddressUrl }}

Quick Formatting Notes

  • All tags start with message indicating the link is specific to the message

  • The link type is included in lowercase

  • Url always begins with an uppercase letter


Standard and Custom Field Variables

The Standard and Custom profile fields in your Listrak account have a lot of power in personalization. Because these fields can be named differently, there are a number of rules to consider when crafting these values.

  • All tags start with contact to indicate that they are stored as profile data

  • All tags use lowercase values

    Email address becomes {{contact.email}}

  • Spaces in field names become underscores

    Loyalty Tier becomes {{ contact.loyalty_tier }}
    First Name becomes {{contact.first_name}}

  • Field names containing special characters (e.g.: %, $, @) are wrapped in brackets and quotation marks

    $ Off Offer becomes {{ contact.["$ Off Offer"] }}

  • If a tag is formatted incorrectly the message will send, but no value will appear



Formatting Variables in If Statements

Evaluating a Field as Empty

Liquid filtering is typically set up find and target contacts who have or do not a value in a particular field. Using this concept, the value liquid should evaluate is an empty value or nil. Another possibility is unknown. In the example below, if a contact's first name is not empty (is not nil or is not unknown) the contact's first name will appear in the sentence.

{% if contact.first_name != blank and contact.first_name != nil %}{{contact.first_name}}, your order is on the way!{% endif %} 

Evaluating a Single Criteria

Often, you may want to create dynamic content elements in your email to target those contacts who have a specific value in a profile field. You can easily target a specific criteria value with liquid.

{% if contact.loyalty_info.is_member == "on" %} Time to get the VIP experience {% endif %}

Evaluating Multiple Fields or Conditions

You may also want to evaluate multiple fields to determine if a contact has at last one attribute, or you may want to accept multiple values in a single field.

Multiple values can be connected with the and and or operator. Operators will be evaluated from left to right.

{% if contact.loyalty_current_tier_level C== "Bronze" or contact.loyalty_current_tier_level == "Silver" or contact.loyalty_current_tier_level == "Gold" %} VIPs earn extra points in our sale starting TODAY! {% else %} Shop today's sale! {% endif %}

📌 In the example above, the content is dynamically updated if a contact has one of three values in their loyalty tier profile field. If a contact has the value of Bronze, Silver, or Gold, they will receive the dynamic subject line. All others will see the generic Shop today's sale subject line.



📖 New to Flash Sales? Check out other Flash Sale Documentation



Did this answer your question?