Klaviyo Email Variables & Dynamic Tags: Complete Reference (2025)

Klaviyo Email Variables & Dynamic Tags: Complete Reference (2025)

Klaviyo's email personalization runs on Jinja2 templating — a Python-based templating language that uses double-brace syntax for variables and percent-brace syntax for logic blocks. If you're designing emails in Figma and exporting HTML with Marka, you can type Klaviyo variables directly into your text layers. Marka preserves them exactly in the output.

This is the complete reference for the variables and tags Klaviyo supports.


Syntax overview

Klaviyo uses two tag types:

  • Variable tags — wrap a variable name in double curly braces: {{ variable_name }}
  • Block tags — wrap logic in percent-curly braces: {% if condition %} ... {% endif %}

Type these directly into Figma text layers. Marka preserves them when exporting HTML.


Profile variables

These pull data from a contact's Klaviyo profile.

Variable name Description
first_name Contact's first name
last_name Contact's last name
email Contact's email address
organization Contact's company/organization
title Contact's job title
city Contact's city
region Contact's region or state
country Contact's country
phone_number Contact's phone number

Wrap any of these in {{ }} when placing them in Figma text layers — for example, type {{ first_name }} in your greeting line.

Default fallbacks: add |default('fallback') after the variable name to set a fallback when a value is missing. For example, {{ first_name|default('there') }} outputs there if no first name is set. Always add fallbacks to variables that appear in email copy.


Event variables

Event-triggered flows have access to event-specific data. The variables available depend on which event triggered the flow.

Placed Order event:

Variable name Description
event.value Order total value
event.extra.order_id Order ID
event.extra.items Array of order items
event.extra.items.0.product_name First item's product name
event.extra.items.0.quantity First item's quantity
event.extra.items.0.item_price First item's price

Viewed Product event:

Variable name Description
event.extra.ProductName Product name
event.extra.ImageURL Product image URL
event.extra.URL Product page URL
event.extra.Price Product price

Organization variables

Variable name Description
organization.name Your organization name
organization.address1 Address line 1 (CAN-SPAM)
organization.address2 Address line 2
organization.city City
organization.state State
organization.zip ZIP code
organization.country Country

Required tags (unsubscribe)

Klaviyo requires all emails to include an unsubscribe link. Use {{ unsubscribe_link }} as the URL for your unsubscribe text layer in Figma. In the plugin's link field, enter the variable exactly — Marka exports it as the href in the HTML anchor tag.

For email preferences use {{ manage_preferences_link }} instead — this shows a manage preferences page rather than an immediate unsubscribe.


Conditional blocks

Klaviyo uses Jinja2 if/else/endif syntax for conditional content. Type these tags directly into Figma text layers.

Basic if/else: Start a text layer with {% if first_name %}, add your conditional content, then close with {% else %} and {% endif %} in separate text layers.

Checking a specific property: Use {% if person|lookup('VIP') == True %} to check a profile property, then close with {% endif %}.

Multiple conditions: Combine with {% elif %} for multiple branches. For example, check if event.extra.order_total exceeds a threshold and show different messaging for each case.

For conditional blocks that wrap multiple design elements (showing/hiding entire sections), add the Jinja tags as text layers in Figma marked as Hidden — Marka exports them into the HTML where you can activate them after export.


Loops (for product recommendations)

Use {% for item in event.extra.items %} ... {% endfor %} to loop through order items. Inside the loop, reference item properties like {{ item.product_name }} and {{ item.item_price }}.

To limit the number of items shown, use Python slice syntax inside the for tag — for example event.extra.items[:3] limits the loop to the first 3 items.


Date formatting

Use the datef() filter to format dates. Apply it to a date variable — for example, {{ event.extra.order_date|datef('%B %d, %Y') }} outputs a date like "March 30, 2026".

Common format strings:

Format string Output example
%B %d, %Y March 30, 2026
%m/%d/%Y 03/30/2026
%b %d Mar 30

How to use Klaviyo variables in Figma

Type variables directly into Figma text layers. Marka Email Generator Plugin preserves the text exactly — including double-brace and block-tag delimiters.

Greeting line: type {{ first_name|default('there') }}, into a greeting text layer.

Unsubscribe link: enter {{ unsubscribe_link }} in the plugin's link field for the unsubscribe text layer.

Footer CAN-SPAM block: combine org variables in a single text layer: {{ organization.name }} · {{ organization.address1 }}, {{ organization.city }}, {{ organization.state }} {{ organization.zip }}.


Klaviyo variables template for Figma

The Klaviyo variables reference template is a Figma file with all common variables pre-placed in the correct positions: greeting, footer, product loop, order total, and unsubscribe link. Use it as a reference or as a base for your own designs.


More resources

More articles