Logo

Documentation

Email Variables

How to use variables in email templates.

Our email templating system allows you to insert dynamic variables into your email templates using the {{topic.variable}} format. These variables will be replaced with actual data when the email is sent. This ensures that your emails are personalized and relevant to each recipient.

Available Variables

Business Variables

You can reference the following variables to insert business-related details:

  • {{business.name}} - The name of the business
  • {{business.brandName}} - The brand name of the business
  • {{business.logoId}} - The ID of the business logo
  • {{business.socialLinkFacebook}} - Facebook link of the business
  • {{business.socialLinkInstagram}} - Instagram link of the business
  • {{business.socialLinkPinterest}} - Pinterest link of the business
  • {{business.socialLinkTwitter}} - Twitter link of the business
  • {{business.socialLinkTikTok}} - TikTok link of the business
  • {{business.socialLinkLinkedIn}} - LinkedIn link of the business
  • {{business.domain}} - The business domain name
  • {{business.websiteScreenshotUrl}} - Screenshot URL of the business website
  • {{business.fullAddress}} - The full address of the business
  • {{business.phoneNumber}} - The phone number of the business
  • {{business.emailAddress}} - The email address of the business

Person Variables

These variables reference persons stored in our system:

  • {{person.id}} - Unique identifier for the person
  • {{person.firstName}} - First name from the person
  • {{person.lastName}} - Last name from the person
  • {{person.emailAddress}} - Email address from the person
  • {{person.countryCode}} - Country code from the person
  • {{person.regionCode}} - Region code from the person
  • {{person.city}} - City from the person
  • {{person.timezones}} - Timezones from the person
  • {{person.phone}} - Phone from the person
  • {{person.totalSpent}} - The total spending of the person
  • {{person.ordersCount}} - The total number of orders of the person

If your business has custom person properties set up, you can reference them using:

  • {{person.properties.<custom_property_id>}} - Custom person property

Campaign Variables (Optional)

If enabled, you can reference campaign-related details:

  • {{campaign.id}} - Unique campaign ID
  • {{campaign.name}} - Campaign name
  • {{campaign.description}} - Campaign description
  • {{campaign.start_date}} - Campaign start date
  • {{campaign.end_date}} - Campaign end date

Event Variables (Only Available in Email Templates)

These variables reference events that triggered the email:

  • {{event.emailAddress}} - Email address of the recipient
  • {{event.eventType}} - Type of event that triggered the email
  • {{event.pathname}} - Pathname of the event occurrence
  • {{event.referrerUrl}} - URL of the referrer
  • {{event.timestamp}} - Event timestamp
  • {{event.deviceId}} - Device ID of the user
  • {{event.sessionId}} - Session ID
  • {{event.userAgent}} - User agent string
  • {{event.pageUrl}} - URL of the page
  • {{event.clickUrl}} - URL that was clicked
  • {{event.productHandle}} - Product handle related to the event
  • {{event.productId}} - Product ID
  • {{event.cartId}} - Cart ID
  • {{event.emailId}} - Email ID associated with the event
  • {{event.orderId}} - Order ID
  • {{event.variantId}} - Variant ID of the product
  • {{event.searchQuery}} - Search query performed by the user
  • {{event.browserName}} - Name of the browser
  • {{event.city}} - City of the user
  • {{event.country}} - Country of the user
  • {{event.zip}} - ZIP code
  • {{event.timezone}} - User's timezone
  • {{event.region}} - User's region
  • {{event.regionName}} - Name of the region
  • {{event.isp}} - Internet Service Provider
  • {{event.operatingSystem}} - Operating system used
  • {{event.hashedIp}} - Hashed IP address

Current Date Variables

The system provides access to current date information in various formats:

  • {{currentDate.date}} - Full formatted date (e.g., "December 25, 2024")
  • {{currentDate.year}} - Current year as a number (e.g., 2024)
  • {{currentDate.month}} - Current month name (e.g., "December")
  • {{currentDate.day}} - Current day of month as a number (e.g., 25)

Agent Variables

These variables are only available in email templates that are sent by an agent step in a flow execution:

  • {{agent.productId}} - Product ID
  • {{agent.message}} - Custom message

Best Practices

  • Use only the variables listed above. Using unrecognized variables may cause emails to render incorrectly.
  • Always use {{business.id}} instead of the literal business ID to avoid errors.
  • Ensure that all necessary variables are present in your template before sending emails.

By following this guide, you can leverage dynamic templating to create personalized and data-driven campaigns.