# Understanding personalization variables in email templates

{% hint style="info" %}

## Before you begin

If you’re new to designing email templates, check out this guide to get started: [Design your email templates](/xflow-app/email-templates/design-your-email-templates.md)
{% endhint %}

## What are variables

Variables are **placeholders** that **automatically pull in dynamic data** and insert it into your email content. When an email is sent, **each variable is replaced with real information** from your store, customer, or product.

Variables update **automatically based on the recipient**, so you only need to design your email once and reuse it across different customers and campaigns.

*Example:*

* `Hi {{customer.name}}`
* `Thanks for purchasing {{product.title}} from {{shop.name}}.`

\
From the example above, you can see that `{{customer.name}}`, `{{product.title}}`, and `{{shop.name}}` are variables. These values **automatically update for different products and different customers.**

## Types of variables

<figure><img src="/files/JjupERvYzBqcp18PJj2b" alt=""><figcaption></figcaption></figure>

<table><thead><tr><th width="167.499267578125">Variable</th><th>Description</th></tr></thead><tbody><tr><td>customer</td><td>Data related to customer information, such as name or email address.</td></tr><tr><td>product</td><td>Data related to the product, such as product name, price, or description.</td></tr><tr><td>shop</td><td>Data related to your store, such as shop name or contact details.</td></tr><tr><td>variant</td><td>Data related to a specific product variant, such as size, color, or SKU.</td></tr><tr><td>Custom variables</td><td>Custom values created by you to fit specific needs.</td></tr></tbody></table>

{% hint style="info" %}
More about variables in XFlow: [Available variables in email templates](/xflow-app/email-templates/understanding-personalization-variables-in-email-templates/available-variables-in-email-templates.md)
{% endhint %}

## How to use variables to personalize your email

{% stepper %}
{% step %}

### Add variables to your email

In **Email configs** or a **Workflow action**, click **Add variable** in the subject or email content field.

{% hint style="info" %}
Learn more about workflow actions: [Understanding workflow actions](/xflow-app/workflows/understanding-workflow-actions.md)
{% endhint %}

In the **email template builder**, click<img src="/files/kOHDJR3n3xi8mxdFdVr2" alt="" data-size="line"> to add variables.

{% hint style="info" %}
Learn more: [Design your email templates](/xflow-app/email-templates/design-your-email-templates.md)
{% endhint %}

<figure><img src="/files/cJgC5fYMaJ0z6x0vS5s1" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Select the variables you want to use

Choose the variables that fit your email purpose. All available variables can be found in the variable list after clicking **Add variable**.

{% hint style="success" %}
Use variables thoughtfully and make sure they are relevant to your email content for the best experience.

Learn more: [Available variables in email templates](/xflow-app/email-templates/understanding-personalization-variables-in-email-templates/available-variables-in-email-templates.md)
{% endhint %}

<figure><img src="/files/wW4vPKZ0z3C5tx6jLjpd" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Your email is successfully personalized!

Once added, variables will appear in the format `{{variable_name}}` in your subject or email content.

When the **email is sent**, these variables will **automatically be replaced with real data**.

{% hint style="info" %}
Want to make sure your variables are working perfectly? Check out [Test an email campaign](/xflow-app/campaigns/test-an-email-campaign.md)
{% endhint %}

<figure><img src="/files/9oFkkNDIacI707j9FLJR" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
Make sure the data is available, as **variables with missing values** will **appear empty** in the email.
{% endhint %}
{% endstep %}
{% endstepper %}

## Benefits of using variables

Using variables allows you to personalize your emails with dynamic data, making your communication more relevant and engaging for each recipient.

* **Personalized customer experience:** Automatically tailor emails with customer, product, or order details to create a more personal connection.
* **Higher engagement rates:** Personalized subject lines and content are more likely to be opened, read, and clicked.
* **Time-saving and scalable:** Create one email template and use variables to dynamically populate content for many customers.
* **Consistent and accurate messaging:** Reduce manual edits and human errors by pulling data directly from your system.
* **More relevant content:** Show the right information (such as product names or order details) at the right time.

## Common use cases of using variables

<table><thead><tr><th width="119.58734130859375">Variable</th><th width="311.368408203125">Common use cases</th><th>Example</th></tr></thead><tbody><tr><td>customer</td><td>Email greetings that mention the customer’s name and personalize the message.</td><td>Hi <em>{{customer.first_name}}</em>, thanks for signing up!</td></tr><tr><td>product</td><td>Showing product details such as product name in the email content.</td><td><em>{{product.title}}</em> is back in stock!</td></tr><tr><td>shop</td><td>Adding store information for branding or support purposes</td><td>You’re receiving this email from <em>{{shop.name}}</em>.</td></tr><tr><td>variant</td><td>Showing specific product variant details such as size or color</td><td>You selected size <em>{{variant.size}}</em> in <em>{{variant.color}}</em>.</td></tr><tr><td>Custom variables</td><td>Adding custom messages, links, or values you want to control.</td><td>If you no longer wish to receive these emails, you can unsubscribe here: <em>{{unsubscribe_link}}</em></td></tr></tbody></table>

## Related articles

{% content-ref url="/pages/nXwNg4IKnFUKyqmD5GJb" %}
[Create an email template](/xflow-app/email-templates/create-an-email-template.md)
{% endcontent-ref %}

{% content-ref url="/pages/zEXuoV3arc2WNCI1i5wq" %}
[Design your email templates](/xflow-app/email-templates/design-your-email-templates.md)
{% endcontent-ref %}

{% content-ref url="/pages/9TMXBePs6zA8bV4oj3K6" %}
[Preview and test your email](/xflow-app/email-templates/preview-and-test-your-email.md)
{% endcontent-ref %}

{% content-ref url="/pages/7mi2grXoNsptsyKEmoV6" %}
[Use email templates in campaigns and workflows](/xflow-app/email-templates/use-email-templates-in-campaigns-and-workflows.md)
{% endcontent-ref %}

{% content-ref url="/pages/Rey69myeVHiNlaksnEsa" %}
[Email templates: FAQs](/xflow-app/email-templates/email-templates-faqs.md)
{% endcontent-ref %}

***

#### 📩 **Need help?**

We’re here to make your XFlow experience smooth and successful.\
Our support team is always ready to assist you—no matter how big or small your question is.

<a href="https://admin.shopify.com/apps/xflow?chat=true&#x26;utm_source=foxecom&#x26;utm_medium=help_center_xflow_understanding_personalization_variables_in_email_templates&#x26;utm_campaign=cta_button&#x26;utm_term=chat_now" class="button primary" data-icon="comment-lines">Chat now</a> <a href="mailto:contact@help.xflow.so" class="button secondary" data-icon="envelopes">Message us</a>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.foxecom.com/xflow-app/email-templates/understanding-personalization-variables-in-email-templates.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
