Site icon Email Uplers

A Beginner’s Guide to Liquid: Personalization And Dynamic Content in Braze

Liquid in Braze

The significance of personalization is not lost on marketers anymore. 

As a result, business software vendors are enhancing their tools to make implementing personalization more intuitive. 

So the question now isn’t whether personalization is part of your client’s marketing strategy. It most certainly is. 

Rather, do you as a service provider have extensive software expertise? Can you implement personalization on your client’s preferred software or ESP? 

Because software literacy is how you’re going to stand out. 

At Email Uplers, we’re experts at 50+ ESPs, including Braze. All-round software literacy enables us to meet various ESP-specific project requirements to spec. 

In this beginner-friendly guide, Braze is where it’s at. We’re going to show you how to do personalization in Braze using Liquid, a programming language. 

What Is Liquid?

Components of Liquid

Objects in Liquid

Filters in Liquid

Tags in Liquid

Advanced Data Types: Arrays & Objects

Arrays of Objects

Practical Use Cases of Liquid

What Is Liquid? 

Liquid, developed by Shopify, is a programming language written in Ruby, which is used to create dynamic content based on user data. 

Liquid is open-source, meaning it’s available for use by anyone. Compared to more complex coding languages, Liquid is straightforward and easy to learn, making it an excellent tool for marketers looking to personalize their communications.

Key Points:

If you choose to use Liquid in your email messages, be sure to insert it using the HTML editor as opposed to the classic editor.

— Braze

Components of Liquid

Liquid is composed of three main elements, each serving a specific role in creating dynamic content: variables, tags, and filters. 

1. Variables

2. Tags

3. Filters

In our next section, we’ll explore these basics in a bit more detail.

Objects in Liquid 

Objects represent data points stored in Braze, accessed using standard attributes like {{ first_name }} and {{ email_address }}.

Filters in Liquid

Filters modify content within objects. Examples include:

Tags in Liquid

Tags define conditional logic using if, else if, and else statements:

Place Liquid code within the <body> tag only. Placing it outside this tag may cause inconsistent rendering upon delivery.

— Braze

Advanced Data Types: Arrays & Objects

1. Arrays

2. Objects

Arrays of Objects 

Practical Use Cases of Liquid

1. Content Personalization

2. Multilingual Emails

Create emails that adapt to the recipient’s language preference using Liquid’s conditional logic:

Incidentally, you can also add a custome attribute to set your preferred color in the following manner:

{% if {{custom_attribute.${favorite_color}}} == ‘red’ %}

3. Abandoned Cart Emails

Leverage Liquid for loops to create dynamic abandoned cart emails:

4. Random Number Generation

Use current time and modulo operations to generate random numbers for various scenarios, like randomizing email subject lines:

Braze does not currently support 100% of Shopify’s Liquid… We highly recommend testing all messages using Liquid before sending them…

— Braze

Need A Hand to Get Started?

Liquid provides a powerful yet accessible way to create personalized and dynamic content in Braze. By understanding and leveraging variables, tags, and filters, marketers can enhance their campaigns and deliver more relevant messages to their audience. 

If you need help getting started, get in touch with our Braze-certified experts. For more information on this ESP, catch our series on all things Braze.

Exit mobile version