This reference document lists all the variables that are available for Adobe Commerce transactional email campaigns. You can also use any Adobe Commerce variables in the subject line of your transactional email template.
When building your transactional email templates, the variables must be inserted to merge the customer, order, and shipping information.
Before you start
Things you need to know:
Using Dotdigital data fields in your Adobe Commerce transactional email template causes the send to fail because the sends are triggered directly from Adobe Commerce.
Since Adobe Commerce is customisable, each environment can interpret the variables differently. It's strongly recommended to reach out to your agency for a detailed list of variables that you can use.
There's no guarantee the variables in this article will work in your unique environment. Support is limited and suggestions can only be provided to you. It's not possible to tell you which ones you should use, and because of this, your agency is the best resource to help answer these types of questions.
New account variables
Variable name | Variable |
Customer name |
|
Store name |
|
Customer account URL |
|
Forgot account password URL |
|
Customer email |
|
New order confirmation variables
Variable name | Variable |
Customer name |
|
Store name |
|
Customer account URL |
|
Order ID |
|
Order created/placed at |
|
Order status |
|
If order notes |
|
Order notes |
|
Billing address |
|
Shipping address |
|
Payment method |
|
Shipping method |
|
Order items |
|
New shipment variables
Variable name | Variable |
Customer name |
|
Store name |
|
Customer account URL |
|
Order ID |
|
Order status |
|
Shipment ID |
|
Shipment comment |
|
Shipping tracking details |
|
Billing address |
|
Shipping address |
|
Payment method |
|
Shipping method |
|
Shipment items layout |
|
New invoice variables
Variable name | Variable |
Customer name |
|
Store name |
|
Customer account URL |
|
Order ID |
|
Order status |
|
Invoice ID |
|
Invoice comments |
|
Billing address |
|
Shipping address |
|
Payment method |
|
Shipping method |
|
Order invoice items layout |
|
Product stock alert variables
Variable name | Variable |
Customer name |
|
Store name |
|
Newsletter subscription confirmation variables
Variable name | Variable |
Default newsletter subscription confirmation |
|
How variables and template styling work together
Variables allow you to dynamically insert personalized content into your email templates, while CSS ensures these templates maintain a consistent and branded look.
Insert dynamic content:
Variables such as
{{var customer.name}}
and{{config path="general/store_information/name"}}
insert dynamic content into your email templates. This ensures that each email is tailored to the recipient.
Style with CSS:
When customising the design of your email templates, you can incorporate these variables within the HTML structure. For example, you can style the customer name using CSS:
<p style="font-size: 16px; color: #333;">Hello, {{var customer.name}}</p>
Maintain consistency:
By using the default CSS provided in Magento's theme, you can ensure that your customized templates maintain a consistent look and feel with the default Magento emails. This involves using the same CSS classes and styles while inserting the variables where needed.
Style and customise templates
You can add basic CSS to your templates to ensure your transactional emails match the default formatting and your brand's design. This section provides an overview of the steps to customize your email templates.
Style template
As a merchant, you may want to send a branded Dotdigital campaign for new order confirmations that resembles the default Magento email structure but with your company’s design.
To do this:
Create a triggered email campaign.
Learn more in Create a triggered email campaign.Copy the Magento default CSS template.
Paste the CSS into the source code of your campaign.
Learn more in Add CSS to your email templates.Find the placeholder data in your email template.
For example:
<div class="order-items">[Placeholder for order items]</div>
Replace the placeholder data with Magento variable tags wrapped in {% raw %} tags.
For example:
{% raw %}{{layout handle="sales_email_order_items" order_id=$order_id area="frontend"}}{% endraw %}
This step ensures the email content is dynamically generated based on Magento data.Save and test your campaign.
The default CSS template for sales emails is specific to the Magento_Sales module. For other emails, you can find the corresponding CSS in the relevant module.
See also: