Email variables guide
Personalize your emails and create dynamic content using Mantle’s email variables. These variables let you automatically insert customer data, app information, and other dynamic content into your emails.
Using variables
To use a variable in your email, simply insert it between double curly braces. For example:
Hello {{ customer.name }}!
Available variables
Unsubscribe management
Essential variables for compliance and user preference management:
Variable | Description |
---|---|
{{ unsubscribeUrl }} | Standard format unsubscribe link |
App information
Details about your Shopify app:
Variable | Description |
---|---|
{{ app.id }} | Your app’s unique identifier |
{{ app.name }} | Your app’s registered name |
{{ app.name | split: ' ' | first }} | First word of your app’s name |
{{ app.iconUrl }} | URL to your app’s icon |
{{ app.displayName }} | Your app’s public display name |
Customer details
Comprehensive customer information:
Variable | Description |
---|---|
{{ customer.id }} | Unique customer identifier |
{{ customer.name }} | Customer’s store name |
{{ customer.email }} | Primary contact email |
{{ customer.tags }} | Customer’s assigned tags |
{{ customer.url }} | Customer’s store URL |
{{ customer.industry }} | Store’s industry category |
{{ customer.customFields }} | Object containing all custom fields |
{{ customer.unsubscribeUrl }} | Customer-specific unsubscribe link |
{{ customer.shopifyDomain }} | Store’s Shopify domain |
{{ customer.shopifyAdminUrl }} | Direct link to store’s Shopify admin |
{{ customer.appUrl }} | Link to your app within their store |
Subscription information
Available for customers with active subscriptions:
Variable | Description |
---|---|
{{ customer.subscription.id }} | Subscription identifier |
{{ customer.subscription.plan.id }} | Current plan ID |
{{ customer.subscription.plan.name }} | Plan name |
{{ customer.subscription.plan.amount }} | Plan price |
{{ customer.subscription.plan.interval }} | Billing interval |
Usage data
Available for apps with usage tracking:
Variable | Description |
---|---|
{{ customer.usage }} | Complete usage data object |
Organization details
Information about your organization:
Variable | Description |
---|---|
{{ org.name }} | Your organization’s name |
{{ org.websiteUrl }} | Your website URL |
{{ org.supportEmail }} | Support email address |
Social network URLs
Access your organization’s social media links:
Variable | Description |
---|---|
{{ org.socialNetworks.facebook.url }} | Facebook page |
{{ org.socialNetworks.instagram.url }} | Instagram profile |
{{ org.socialNetworks.x.url }} | X (Twitter) profile |
{{ org.socialNetworks.linkedin.url }} | LinkedIn page |
{{ org.socialNetworks.youtube.url }} | YouTube channel |
{{ org.socialNetworks.tiktok.url }} | TikTok profile |
{{ org.socialNetworks.pinterest.url }} | Pinterest profile |
{{ org.socialNetworks.snapchat.url }} | Snapchat profile |
{{ org.socialNetworks.whatsapp.url }} | WhatsApp contact |
Recipient details
Information about the email recipient:
Variable | Description |
---|---|
{{ recipient.id }} | Recipient identifier |
{{ recipient.name }} | Recipient’s name |
{{ recipient.email }} | Recipient’s email address |
{{ recipient.type }} | Recipient type |
{{ recipient.unsubscribeUrl }} | Recipient-specific unsubscribe link |
Sender information
Details about the email sender:
Variable | Description |
---|---|
{{ sender.id }} | Sender identifier |
{{ sender.name }} | Sender’s name |
{{ sender.email }} | Sender’s email address |
{{ sender.address }} | Complete address object |
{{ sender.addressSummary }} | Formatted full address |
{{ sender.addressSummaryShort }} | Shortened address format |
{{ sender.address_summary }} | Alternative address format |
{{ sender.address_summary_short }} | Alternative short format |
Email content
Variables for the email itself:
Variable | Description |
---|---|
{{ email.subject }} | Email subject line |
{{ email.previewText }} | Email preview text |
Usage event data
Available when triggered by usage events:
Variable | Description |
---|---|
{{ usageEvent.id }} | Event identifier |
{{ usageEvent.name }} | Event name |
{{ usageEvent.timestamp }} | Event timestamp |
{{ usageEvent.properties }} | Complete event properties object |
Best practices
- Always test your emails with sample data before sending to ensure variables are rendering correctly.
- Use fallback content for optional variables that might not always have values.
- Consider your audience when using detailed information - not all data may be relevant for every email type.
- Keep your email templates maintainable by documenting which variables you’re using and why.