# Available variables in email templates ![image](https://docs-assets.foxecom.app/xflow-app/XFlow%20docs%20screenshot%20(24)_jIvuZs78.jpg) ## 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. | Data type | Definition | Example | | --- | --- | --- | | Date | Represents a specific date or date-time value. | 2026-02-05 | | String | A sequence of characters used to store text. | Store name | | Number | Numeric values, including integers and decimals. | +14155551234 | | Object | A collection of key–value pairs for structured data. | email: hi@xflow.so | | Array | An ordered list of values. | vip, repeat-customer, newsletter-subscriber | | Boolean | A logical value that can be either true or false. | True/False |
## Available variables Variables are grouped by category: | Variable | Data type | Description | | --- | --- | --- | | `{{customer.signUpDate}}` | Date | The date the customer signed up | | `{{customer.id}}` | String | A globally-unique ID | | `{{customer.firstName}}` | String | Customer’s first name | | `{{customer.lastName}}` | String | Customer’s last name | | `{{customer.email}}` | String | Customer’s email address | | `{{customer.phone}}` | String | Customer’s phone number | | `{{customer.address}}` | String | Street address | | `{{customer.city}}` | String | The name of the city, district, village, or town. | | `{{customer.state}}` | String | State / province | | `{{customer.zip}}` | String | The zip or postal code of the address. | | `{{customer.country}}` | String | Country | | `{{customer.status}}` | String | Customer account status | | `{{customer.customerShopifyId}}` | String | Shopify customer ID | | `{{customer.numberOfOrders}}` | Number | Total number of orders placed | | `{{customer.amountSpent.amount}}` | Number | A monetary value in decimal format | | `{{customer.amountSpent.currencyCode}}` | String | The three-letter currency code that represents a world currency used in a store. | | `{{customer.createdAt}}` | Date | Date the customer account was created | | `{{customer.tags}}` | Array | Tags assigned to the customer | | `{{customer.lastOrder}}` | Object | Most recent order details | | `{{customer.defaultEmailAddress}}` | Object | Default email address object | | `{{customer.defaultPhoneNumber}}` | Object | Default phone number object | | `{{customer.acceptsMarketing}}` | Boolean | Indicates if the customer accepts marketing |
| Variable | Data type | Description | | --- | --- | --- | | `{{product.title}}` | String | The name for the product that displays to customers. | | `{{product.description}}` | String | Product description | | `{{product.handle}}` | String | Product handle (URL slug) | | `{{product.id}}` | String | Product ID | | `{{product.productType}}` | String | Product type | | `{{product.status}}` | String | Product status (active, draft, archived) | | `{{product.tags}}` | Array | Product tags | | `{{product.vendor}}` | String | Product vendor | | `{{product.compareAtPrice}}` | String | Compare-at price | | `{{product.price}}` | String | Product price | | `{{product.image}}` | Object | Product featured image | | `{{product.totalInventory}}` | Number | Total inventory quantity | | `{{product.onlineStoreUrl}}` | String | The product's URL on the online store. If `null`, then the product isn't published to the online store sales channel. | | `{{product.variants}}` | Array | Product variants list |
| Variable | Data type | Description | | --- | --- | --- | | `{{shop.name}}` | String | Shop name | | `{{shop.country}}` | String | Shop country | | `{{shop.phone}}` | String | Shop phone number | | `{{shop.primaryLocale}}` | String | Shop primary locale | | `{{shop.currency}}` | String | Shop currency | | `{{shop.timezone}}` | String | Shop timezone | | `{{shop.ianaTimezone}}` | String | IANA timezone | | `{{shop.shopOwner}}` | String | Shop owner name | | `{{shop.passwordEnabled}}` | Boolean | Store password status | | `{{shop.city}}` | String | Shop city | | `{{shop.contactEmail}}` | String | Contact email | | `{{shop.address}}` | String | Shop address | | `{{shop.shopId}}` | String | Shop ID | | `{{shop.email}}` | String | Shop email | | `{{shop.domain}}` | String | Shop domain | | `{{shop.myShopifyDomain}}` | String | Shopify domain | | `{{shop.primaryDomain}}` | String | Primary domain |
| Variable | Data type | Description | | --- | --- | --- | | `{{variant.compareAtPrice}}` | String | Variant compare-at price | | `{{variant.id}}` | String | Variant ID | | `{{variant.price}}` | String | Variant price | | `{{variant.title}}` | String | Variant title | | `{{variant.image}}` | Object | Variant image | | `{{variant.availableForSale}}` | Boolean | Available for sale | | `{{variant.inventoryQuantity}}` | String | Inventory quantity |
Learn how to add more custom variables to fit your needs: [Add custom variables](#add-custom-variables) ### Add custom variables #### Add custom variables for a specific email template Steps: 1. Open an Email template. 2. Select **Edit configs** and add the variable you want to the **Custom variables** field. 3. Click **Add**. ![image](https://docs-assets.foxecom.app/xflow-app/XFlow%20docs%20screenshot%20(75)_dV7esMuB.jpg) #### 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. ![image](https://docs-assets.foxecom.app/xflow-app/XFlow%20docs%20screenshot%20(76)_qslio5Bi.jpg) #### Use the variable in your email Add that variable to the position you want within the email configs. Learn more: [How to use variables to personalize your email](https://docs.foxecom.com/xflow-app/email-templates/understanding-personalization-variables-in-email-templates#how-to-use-variables-to-personalize-your-email) ![image](https://docs-assets.foxecom.app/xflow-app/XFlow%20docs%20screenshot%20(77)_UVFQNnvn.jpg) #### Add content for the variable Steps: 1. Go to the **Workflow builder** 2. Add content to the variable field of that email template. Learn more: [Use email templates in campaigns and workflows](https://docs.foxecom.com/xflow-app/email-templates/use-email-templates-in-campaigns-and-workflows) ![image](https://docs-assets.foxecom.app/xflow-app/XFlow%20docs%20screenshot%20(78)_01XbQMBg.jpg) ## Related articles Explore pre-built email templates Use email templates in campaigns and workflows Email templates: FAQs