Using Email Variables (Placeholders)
Learn how to use dynamic variables in email templates to personalize customer communications automatically.
What Are Email Variables?
Section titled “What Are Email Variables?”Email variables (also called placeholders or merge tags) are dynamic content that automatically fills in with real data when emails are sent.
Example:
Template: Hi {customer.name}, thank you for your order!Sent email: Hi John, thank you for your order!Available Variables
Section titled “Available Variables”Customer Variables
Section titled “Customer Variables”{customer.name} - Customer’s first name
Example: JohnUsage: Hi {customer.name}!{customer.email} - Customer’s email address
Example: john@example.comUsage: Sent to {customer.email}{customer.full_name} - Customer’s full name
Example: John SmithUsage: Dear {customer.full_name},Shop Variables
Section titled “Shop Variables”{shop.name} - Your shop name
Example: My Digital StoreUsage: Thank you for your purchase from {shop.name}{shop.domain} - Your shop URL
Example: mystore.myshopify.comUsage: Visit {shop.domain} for more products{shop.email} - Shop contact email
Example: support@mystore.comUsage: Contact us at {shop.email}Order Variables
Section titled “Order Variables”{order.number} - Order number
Example: #1001Usage: Order {order.number} is ready{order.id} - Internal order ID
Example: 5234567890123Usage: Order ID: {order.id}{order.date} - Order date
Example: January 15, 2024Usage: Ordered on {order.date}Download Variables
Section titled “Download Variables”{download.expiry} - Download link expiration (days)
Example: 60Usage: This link expires in {download.expiry} days{download.button} - Download button (automatically inserted)
Note: Don't manually add this - it's auto-inserted{download.link} - Raw download URL
Example: https://your-app.com/download?key=abc123Usage: Download: {download.link}(Not recommended - use button instead)How to Insert Variables
Section titled “How to Insert Variables”Method 1: Variable Button
Section titled “Method 1: Variable Button”- Click in text field where you want variable
- Click Insert Variable button
- Dropdown menu shows available variables
- Click variable to insert
- Variable appears in text with curly braces
Method 2: Type Manually
Section titled “Method 2: Type Manually”- Type opening brace:
{ - Auto-complete suggestions appear (if available)
- Type variable name:
customer.name - Type closing brace:
}
Result: {customer.name}
Method 3: Copy and Paste
Section titled “Method 3: Copy and Paste”Copy variable from documentation:
{customer.name}{shop.name}{order.number}Paste into email template field.
Using Variables in Email Templates
Section titled “Using Variables in Email Templates”Subject Line
Section titled “Subject Line”Your download from {shop.name}Order #{order.number} ready for download{customer.name}, your files are here!Email Title
Section titled “Email Title”Thank You, {customer.name}!Your {shop.name} Files Are ReadyWelcome to {shop.name}Message Body
Section titled “Message Body”Hi {customer.name},
Thank you for your purchase from {shop.name}.
Your order #{order.number} is ready to download.This download link will expire in {download.expiry} days.
If you have questions, email us at {shop.email}.
Enjoy!The {shop.name} TeamFooter Text
Section titled “Footer Text”© 2024 {shop.name}. All rights reserved.Questions? Contact {shop.email}Order #{order.number} | {order.date}Variable Examples by Use Case
Section titled “Variable Examples by Use Case”Professional & Formal
Section titled “Professional & Formal”Subject: Your Order #{order.number} from {shop.name}
Dear {customer.full_name},
Thank you for your order placed on {order.date}.Your digital products are now available for download.
This download link will remain active for {download.expiry} days.
Should you require assistance, please contact us at {shop.email}.
Best regards,{shop.name}Friendly & Casual
Section titled “Friendly & Casual”Subject: {customer.name}, your files are ready! 🎉
Hey {customer.name}!
Your order from {shop.name} is all set! Click below to grab your files.
Remember, you've got {download.expiry} days to download, so no rush!
Questions? Just reply to this email!
Cheers,The {shop.name} TeamMinimal & Direct
Section titled “Minimal & Direct”Subject: Download: Order #{order.number}
{customer.name},
Your files from {shop.name} are ready.Download below. Link expires in {download.expiry} days.
{shop.email}Variable Best Practices
Section titled “Variable Best Practices”1. Always Use Shop Name
Section titled “1. Always Use Shop Name”Include {shop.name} for brand recognition:
- In subject line
- In message body
- In footer
Good:
Subject: Your download from {shop.name}Message: Thank you for your purchase from {shop.name}Bad:
Subject: Your downloadMessage: Thank you for your purchase2. Personalize When Possible
Section titled “2. Personalize When Possible”Use {customer.name} for personalization:
Good:
Hi {customer.name}, your files are ready!Bad:
Hi there, your files are ready!3. Include Order Number
Section titled “3. Include Order Number”Reference {order.number} for support:
Order #{order.number} is readyReference order #{order.number} if you need helpBenefits:
- Easy for customer to reference
- Helps support team locate orders
- Professional appearance
4. Mention Expiry
Section titled “4. Mention Expiry”Always inform about {download.expiry}:
Download link expires in {download.expiry} daysYou have {download.expiry} days to access your filesWhy:
- Sets expectations
- Creates urgency
- Reduces support questions
5. Provide Contact Info
Section titled “5. Provide Contact Info”Include {shop.email} for support:
Questions? Contact us at {shop.email}Email {shop.email} if you need helpReply to this email for supportVariable Formatting
Section titled “Variable Formatting”Capitalization
Section titled “Capitalization”Variables preserve capitalization:
{customer.name} = John (capitalized){CUSTOMER.NAME} = Not valid (use lowercase variable names)Fallback Values
Section titled “Fallback Values”If customer name is missing:
{customer.name} → "Customer" or "there"System provides sensible fallback:
Hi {customer.name}! → Hi there!Variable Testing
Section titled “Variable Testing”Test with Sample Data
Section titled “Test with Sample Data”When sending test emails:
Variables show sample data:
{customer.name} → John Smith (sample){order.number} → #1001 (sample){shop.name} → Your actual shop nameTest Checklist
Section titled “Test Checklist”- All variables display correctly
- No broken variables (showing {variable} literally)
- Capitalization looks natural
- Spacing around variables correct
- Variables in right context
Common Variable Issues
Section titled “Common Variable Issues”Issue: Variable Shows Literally
Section titled “Issue: Variable Shows Literally”Problem:
Email shows: Hi {customer.name}!Should show: Hi John!Causes:
- Typo in variable name
- Extra space inside braces
- Using wrong case
Solutions:
- Check spelling:
{customer.name}(not{customername}) - Remove spaces:
{customer.name}(not{ customer.name }) - Use lowercase:
{customer.name}(not{Customer.Name})
Issue: Variable Shows Blank
Section titled “Issue: Variable Shows Blank”Problem:
Email shows: Hi !Should show: Hi John!Cause: Customer data missing (no first name in order)
Solution:
- Use fallback phrasing:
- Instead of
Hi {customer.name}! - Use
Hi {customer.name}orHello there!
- Instead of
- Check customer data in orders
Issue: Wrong Data in Variable
Section titled “Issue: Wrong Data in Variable”Problem:
Email shows wrong shop name or order numberCause: Rare system issue
Solution:
- Check template saved correctly
- Send test email
- Contact support if persists
Advanced Variable Usage
Section titled “Advanced Variable Usage”Combining Variables
Section titled “Combining Variables”Combine multiple variables in one sentence:
Hi {customer.name}, your order #{order.number} from {shop.name} is ready!Variables in Links
Section titled “Variables in Links”Use variables in custom links:
<a href="{shop.domain}">Visit our store</a>
Track your order: {shop.domain}/orders/{order.number}Conditional Content (Advanced)
Section titled “Conditional Content (Advanced)”Some platforms support conditional variables:
{if customer.name} Hi {customer.name}!{else} Hi there!{endif}Note: Check if your app version supports this.
Variable Reference Table
Section titled “Variable Reference Table”| Variable | Description | Example |
|---|---|---|
{customer.name} | First name | John |
{customer.full_name} | Full name | John Smith |
{customer.email} | john@example.com | |
{shop.name} | Shop name | My Store |
{shop.domain} | Shop URL | mystore.com |
{shop.email} | Support email | support@mystore.com |
{order.number} | Order number | #1001 |
{order.id} | Order ID | 5234567890 |
{order.date} | Order date | Jan 15, 2024 |
{download.expiry} | Expiry days | 60 |
{download.link} | Download URL | https://… |
Variable Tips & Tricks
Section titled “Variable Tips & Tricks”Tip 1: Create Template Variations
Section titled “Tip 1: Create Template Variations”Save templates for different scenarios:
Template A - First Purchase:
Welcome {customer.name}! Thank you for your first order from {shop.name}!Template B - Repeat Customer:
Welcome back {customer.name}! Thanks for ordering from {shop.name} again!Tip 2: Use Variables in Footer
Section titled “Tip 2: Use Variables in Footer”This email was sent to {customer.email}Order reference: #{order.number}Tip 3: A/B Test Variable Usage
Section titled “Tip 3: A/B Test Variable Usage”Test emails with and without personalization:
Version A: Hi {customer.name}!
Version B: Hi there!
Track engagement to see which performs better.
Troubleshooting Variables
Section titled “Troubleshooting Variables”Variables Not Working
Section titled “Variables Not Working”Check:
- Correct variable name
- Proper syntax:
{variable.name} - No extra spaces
- Template saved
- Test email sent
Variables in Wrong Language
Section titled “Variables in Wrong Language”If customers see variables in different languages, check:
- Shop locale settings
- Customer language preference
- Variable translation settings
Next Steps
Section titled “Next Steps”- Customizing Email Templates - Design your emails
- Email Design & Branding - Brand your emails
- Sending Test Emails - Test variable output