# Available variables in email templates

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

## Data types supported by variables

Each variable has a data type that defines the kind of values it can contain. Knowing the data type helps you use variables correctly in your email content.

<table><thead><tr><th width="146.810791015625">Data type</th><th>Definition</th><th>Example</th></tr></thead><tbody><tr><td>Date</td><td>Represents a specific date or date-time value.</td><td>2026-02-05</td></tr><tr><td>String</td><td>A sequence of characters used to store text.</td><td>Store name</td></tr><tr><td>Number</td><td>Numeric values, including integers and decimals.</td><td>+14155551234</td></tr><tr><td>Object</td><td>A collection of key–value pairs for structured data.</td><td>email: hi@xflow.so</td></tr><tr><td>Array</td><td>An ordered list of values.</td><td>vip, repeat-customer, newsletter-subscriber</td></tr><tr><td>Boolean</td><td>A logical value that can be either true or false.</td><td>True/False</td></tr></tbody></table>

## Available variables

Variables are grouped by category:

<details>

<summary>👤 customer</summary>

<table><thead><tr><th width="280.16162109375">Variable</th><th width="110.465087890625">Data type</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:$primary;">{{customer.signUpDate}}</mark></td><td>Date</td><td>The date the customer signed up</td></tr><tr><td><mark style="color:$primary;">{{customer.id}}</mark></td><td>String</td><td>A globally-unique ID</td></tr><tr><td><mark style="color:$primary;">{{customer.firstName}}</mark></td><td>String</td><td>Customer’s first name</td></tr><tr><td><mark style="color:$primary;">{{customer.lastName}}</mark></td><td>String</td><td>Customer’s last name</td></tr><tr><td><mark style="color:$primary;">{{customer.email}}</mark></td><td>String</td><td>Customer’s email address</td></tr><tr><td><mark style="color:$primary;">{{customer.phone}}</mark></td><td>String</td><td>Customer’s phone number</td></tr><tr><td><mark style="color:$primary;">{{customer.address}}</mark></td><td>String</td><td>Street address</td></tr><tr><td><mark style="color:$primary;">{{customer.city}}</mark></td><td>String</td><td>The name of the city, district, village, or town.</td></tr><tr><td><mark style="color:$primary;">{{customer.state}}</mark></td><td>String</td><td>State / province</td></tr><tr><td><mark style="color:$primary;">{{customer.zip}}</mark></td><td>String</td><td>The zip or postal code of the address.</td></tr><tr><td><mark style="color:$primary;">{{customer.country}}</mark></td><td>String</td><td>Country</td></tr><tr><td><mark style="color:$primary;">{{customer.status}}</mark></td><td>String</td><td>Customer account status</td></tr><tr><td><mark style="color:$primary;">{{customer.customerShopifyId}}</mark></td><td>String</td><td>Shopify customer ID</td></tr><tr><td><mark style="color:$primary;">{{customer.numberOfOrders}}</mark></td><td>Number</td><td>Total number of orders placed</td></tr><tr><td><mark style="color:$primary;">{{customer.amountSpent.amount}}</mark></td><td>Number</td><td>A monetary value in decimal format</td></tr><tr><td><mark style="color:$primary;">{{customer.amountSpent.currencyCode}}</mark></td><td>String</td><td>The three-letter currency code that represents a world currency used in a store.</td></tr><tr><td><mark style="color:$primary;">{{customer.createdAt}}</mark></td><td>Date</td><td>Date the customer account was created</td></tr><tr><td><mark style="color:$primary;">{{customer.tags}}</mark></td><td>Array</td><td>Tags assigned to the customer</td></tr><tr><td><mark style="color:$primary;">{{customer.lastOrder}}</mark></td><td>Object</td><td>Most recent order details</td></tr><tr><td><mark style="color:$primary;">{{customer.defaultEmailAddress}}</mark></td><td>Object</td><td>Default email address object</td></tr><tr><td><mark style="color:$primary;">{{customer.defaultPhoneNumber}}</mark></td><td>Object</td><td>Default phone number object</td></tr><tr><td><mark style="color:$primary;">{{customer.acceptsMarketing}}</mark></td><td>Boolean</td><td>Indicates if the customer accepts marketing</td></tr></tbody></table>

</details>

<details>

<summary>📦 product</summary>

<table><thead><tr><th>Variable</th><th width="144.3798828125">Data type</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:$primary;">{{product.title}}</mark></td><td>String</td><td>The name for the product that displays to customers.</td></tr><tr><td><mark style="color:$primary;">{{product.description}}</mark></td><td>String</td><td>Product description</td></tr><tr><td><mark style="color:$primary;">{{product.handle}}</mark></td><td>String</td><td>Product handle (URL slug)</td></tr><tr><td><mark style="color:$primary;">{{product.id}}</mark></td><td>String</td><td>Product ID</td></tr><tr><td><mark style="color:$primary;">{{product.productType}}</mark></td><td>String</td><td>Product type</td></tr><tr><td><mark style="color:$primary;">{{product.status}}</mark></td><td>String</td><td>Product status (active, draft, archived)</td></tr><tr><td><mark style="color:$primary;">{{product.tags}}</mark></td><td>Array</td><td>Product tags</td></tr><tr><td><mark style="color:$primary;">{{product.vendor}}</mark></td><td>String</td><td>Product vendor</td></tr><tr><td><mark style="color:$primary;">{{product.compareAtPrice}}</mark></td><td>String</td><td>Compare-at price</td></tr><tr><td><mark style="color:$primary;">{{product.price}}</mark></td><td>String</td><td>Product price</td></tr><tr><td><mark style="color:$primary;">{{product.image}}</mark></td><td>Object</td><td>Product featured image</td></tr><tr><td><mark style="color:$primary;">{{product.totalInventory}}</mark></td><td>Number</td><td>Total inventory quantity</td></tr><tr><td><mark style="color:$primary;">{{product.onlineStoreUrl}}</mark></td><td>String</td><td>The product's URL on the online store. If <code>null</code>, then the product isn't published to the online store sales channel.</td></tr><tr><td><mark style="color:$primary;">{{product.variants}}</mark></td><td>Array</td><td>Product variants list</td></tr></tbody></table>

</details>

<details>

<summary>🛒 shop</summary>

<table><thead><tr><th width="262.1839599609375">Variable</th><th>Data type</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:$primary;">{{shop.name}}</mark></td><td>String</td><td>Shop name</td></tr><tr><td><mark style="color:$primary;">{{shop.country}}</mark></td><td>String</td><td>Shop country</td></tr><tr><td><mark style="color:$primary;">{{shop.phone}}</mark></td><td>String</td><td>Shop phone number</td></tr><tr><td><mark style="color:$primary;">{{shop.primaryLocale}}</mark></td><td>String</td><td>Shop primary locale</td></tr><tr><td><mark style="color:$primary;">{{shop.currency}}</mark></td><td>String</td><td>Shop currency</td></tr><tr><td><mark style="color:$primary;">{{shop.timezone}}</mark></td><td>String</td><td>Shop timezone</td></tr><tr><td><mark style="color:$primary;">{{shop.ianaTimezone}}</mark></td><td>String</td><td>IANA timezone</td></tr><tr><td><mark style="color:$primary;">{{shop.shopOwner}}</mark></td><td>String</td><td>Shop owner name</td></tr><tr><td><mark style="color:$primary;">{{shop.passwordEnabled}}</mark></td><td>Boolean</td><td>Store password status</td></tr><tr><td><mark style="color:$primary;">{{shop.city}}</mark></td><td>String</td><td>Shop city</td></tr><tr><td><mark style="color:$primary;">{{shop.contactEmail}}</mark></td><td>String</td><td>Contact email</td></tr><tr><td><mark style="color:$primary;">{{shop.address}}</mark></td><td>String</td><td>Shop address</td></tr><tr><td><mark style="color:$primary;">{{shop.shopId}}</mark></td><td>String</td><td>Shop ID</td></tr><tr><td><mark style="color:$primary;">{{shop.email}}</mark></td><td>String</td><td>Shop email</td></tr><tr><td><mark style="color:$primary;">{{shop.domain}}</mark></td><td>String</td><td>Shop domain</td></tr><tr><td><mark style="color:$primary;">{{shop.myShopifyDomain}}</mark></td><td>String</td><td>Shopify domain</td></tr><tr><td><mark style="color:$primary;">{{shop.primaryDomain}}</mark></td><td>String</td><td>Primary domain</td></tr></tbody></table>

</details>

<details>

<summary>🧩 variant</summary>

<table><thead><tr><th width="281.0882568359375">Variable</th><th width="146.9212646484375">Data type</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:$primary;">{{variant.compareAtPrice}}</mark></td><td>String</td><td>Variant compare-at price</td></tr><tr><td><mark style="color:$primary;">{{variant.id}}</mark></td><td>String</td><td>Variant ID</td></tr><tr><td><mark style="color:$primary;">{{variant.price}}</mark></td><td>String</td><td>Variant price</td></tr><tr><td><mark style="color:$primary;">{{variant.title}}</mark></td><td>String</td><td>Variant title</td></tr><tr><td><mark style="color:$primary;">{{variant.image}}</mark></td><td>Object</td><td>Variant image</td></tr><tr><td><mark style="color:$primary;">{{variant.availableForSale}}</mark></td><td>Boolean</td><td>Available for sale</td></tr><tr><td><mark style="color:$primary;">{{variant.inventoryQuantity}}</mark></td><td>String</td><td>Inventory quantity</td></tr></tbody></table>

</details>

<details>

<summary>⚙️ Custom variables</summary>

{% hint style="info" %}
Learn how to add more custom variables to fit your needs: [#add-custom-variables](#add-custom-variables "mention")
{% endhint %}

</details>

### Add custom variables

{% stepper %}
{% step %}

#### Add custom variables for a specific email template

{% hint style="success" %}
Steps:

1. Open an Email template.
2. Select **Edit configs** and add the variable you want to the **Custom variables** field.
3. Click **Add**.
   {% endhint %}

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

{% step %}

#### Your custom variable is now available

Your custom variable will appear along with the code snippet below. You can edit or remove the custom variable whenever you want.

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

{% step %}

#### Use the variable in your email

Add that variable to the position you want within the email configs.

{% hint style="info" %}
Learn more: [Understanding personalization variables in email templates](/xflow-app/email-templates/understanding-personalization-variables-in-email-templates.md#how-to-use-variables-to-personalize-your-email)
{% endhint %}

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

{% step %}

#### Add content for the variable

{% hint style="success" %}
Steps:

1. Go to the **Workflow builder**
2. Add content to the variable field of that email template.
   {% endhint %}

{% hint style="info" %}
Learn more: [Use email templates in campaigns and workflows](/xflow-app/email-templates/use-email-templates-in-campaigns-and-workflows.md)
{% endhint %}

<figure><img src="/files/01XbQMBgp2oTSzrECsD3" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

## Related articles

{% content-ref url="/pages/tEG7HvAAm4FAYdcLDJSn" %}
[Explore pre-built email templates](/xflow-app/email-templates/explore-pre-built-email-templates.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_available_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/available-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.
