In this article, we will explain how to create and personalize an order confirmation email that will be sent through a workflow.
Before you start
- Make sure you have installed the Brevo tracker on your website, added the Identify function to the script, and created the track events.
- Note that if your customers block third-party cookies or use ad/script blockers, they won't be identified by the Brevo tracker. This means that they won't receive your order confirmation emails when they make a purchase on your website.
⚙️ Step 1: Create your order confirmation email template
To create your order confirmation email template:
- Go to Campaigns > Templates.
- Click New Template to create a new email template.
- Configure the settings just like a regular email template.
Note: you can personalize the email subject line and the preview text using contact attributes. - Click Next Step.
🎨 Step 2: Design your order confirmation email template
An order confirmation email should include a header with the company name and logo, a footer with the physical address of the company, contact information, copyright information, and a link to your privacy policy.
Design your template by dragging and dropping content blocks into your template layout to add and format text, images, buttons, and other design elements.
🖋️ Step 3: Personalize your order confirmation email template
A great email design is important, but order confirmation emails should also be personalized to the customer you are sending the email to. You can personalize your order confirmation email by addressing your customers by name and including the details of their order such as the products they purchased, their order total, and their shipping and billing address.
In order to populate the emails sent with these data, you must insert placeholders for contact attributes and order data in your template.
Insert placeholders for contact attributes
You can personalize your order confirmation email template using contact attributes stored within your Brevo contact list. Each attribute describes a type of information you save about your contacts, such as their name, email address, phone number, gender, etc. Personalizing your email template by inserting placeholders for contact attributes will allow the data to be replaced by your shopper's name, favorite color, or any other useful information.
In our example below, we have included a personalization of the contact's first name using the placeholder {{ contact.FIRSTNAME }}.
For more information on personalizing emails using contact attributes, read Personalize your email with contact attributes.
Insert placeholders for order data
To insert data about the shopper's order (price, shipping address, products purchased, etc.), you must insert the corresponding placeholders in your email template.
The method you used for creating your track events predetermines the placeholders for order data:
-
If your track events were automatically created using a Brevo plugin, the placeholders are standardized. To learn if your plugin automatically creates track events, check out our dedicated article Which Brevo plugins automatically create track events?.
- If you or a developer created your track events manually, you must create your own list of available placeholders for use in your email template. These placeholders will be defined by the structure of your track event and the name of your array. By default, the name of Brevo's array is "items".
List of standardized placeholders for order data
Here is the list of the main standardized placeholders that you can insert in your email template if your track events were automatically created using a Brevo plugin.
Items data
Items data placeholders are used to personalize emails with the data of the products that were purchased by a customer. For example, if you want to add the name and price of the products that were purchased, you should add the {{ item.name }} and {{ item.price }} placeholders in your email template. These placeholders will then be replaced by the data of each product at the time the email is sent.
Description | Placeholders for items data |
Name | {{ item.name }} |
SKU | {{ item.sku }} |
Category | {{ item.category }} |
ID | {{ item.id }} |
Name of the product variation (values are separated by commas if there are several) | {{ item.variant_name }} |
ID of the product variation | {{ item.variant_id }} |
Price | {{ item.price }} |
Quantity | {{ item.quantity }} |
Storefront link of the purchased item | {{ item.url }} |
Image | {{ item.image }} |
Order details data
Order details data placeholders are used to personalize emails with the data of the order that was placed by a customer. For example, if you want to add the subtotal, discount, and total price of the order, you should add the {{ params.subtotal }}, {{ params.discount }}, and {{ params.revenue }} placeholders in your email template. These placeholders will then be replaced by the data of the order at the time the email is sent.
Description | Placeholders for order details data |
ID of the order | {{ params.id }} |
Date | {{ params.date }} |
Subtotal | {{ params.subtotal }} |
Discount | {{ params.discount }} |
Shipping fees | {{ params.shipping }} |
Total before tax | {{ params.total_before_tax }} |
Tax | {{ params.tax }} |
Total of the order | {{ params.revenue }} |
Currency | {{ params.currency }} |
URL of the order summary | {{ params.url }} |
Shipping and billing data
Shipping and billing data placeholders are used to personalize emails with the shipping and billing data of the customer who placed an order. For example, if you want to add the customer's first name, last name, and shipping address, you should add the {{ params.shipping_address.firstname }}, {{ params.shipping_address.lastname }}, and {{ params.shipping_address.address1 }} placeholders in your email template. These placeholders will then be replaced by the shipping and billing data of the customer at the time the email is sent.
Description | Placeholders for billing data | Placeholders for shipping data |
First name | {{ params.billing_address.firstname }} | {{ params.shipping_address.firstname }} |
Last name | {{ params.billing_address.lastname }} | {{ params.shipping_address.lastname }} |
Company | {{ params.billing_address.company }} | {{ params.shipping_address.company }} |
Phone number | {{ params.billing_address.phone }} | {{ params.shipping_address.phone }} |
Address 1 | {{ params.billing_address.address1 }} | {{ params.shipping_address.address1 }} |
Address 2 | {{ params.billing_address.address2 }} | {{ params.shipping_address.address2 }} |
City | {{ params.billing_address.city }} | {{ params.shipping_address.city }} |
Country | {{ params.billing_address.country }} | {{ params.shipping_address.country }} |
State | {{ params.billing_address.state }} | {{ params.shipping_address.state }} |
Zip Code | {{ params.billing_address.zipcode }} | {{ params.shipping_address.zipcode }} |
We recommend formatting numbers by using the floatformat filter.
Here's an example of how you can use order data placeholders in your order confirmation email template:
Insert placeholders for product images
To insert product images in your email template using the Drag & Drop Editor:
- Drag and drop a design block that contains space for an image into your email template.
- Click the image block to open the image settings.
- In the Insert from URL field, insert the product image placeholder.
Insert placeholders for product or cart links
Add a link to an image
To add a link to an image using the Drag & Drop Editor:
- Drag and drop a design block that contains space for an image into your email template.
- Hover over the image block.
- Click the link icon.
- In the Link target field, insert the URL placeholder.
Add a link to text
To add a link to text using the Drag & Drop Editor:
-
- Highlight the text you want to turn into a URL.
- Click the link icon.
- In the Link target field, insert the URL placeholder.
🧐 Step 4: Display and interpret order data
After adding your placeholders in your email template, activate the Repeatable content feature for each section that contains a placeholder for items data to ensure that your email template can display multiple products and interpret data sent by your website to Brevo.
To display and interpret your items data using the Drag & Drop Editor:
- In your email template, click the section that contains placeholders for items data.
- From the side panel, open the Repeatable content section.
- In the Repeat block popup window, enter the following information:
- In the Repeat for field, input the plural version of your variable, e.g. for the section containing the placeholder {{ item.name }} the parameter is items. If you have connected your website to Brevo using one of our plugins, the name of the variable array is items by default.
- In the Variable alias field, input the first word in your placeholder, e.g. for the section containing {{ item.name }} the variable is item. If you have connected your website to Brevo using one of our plugins, the name of the variable array is item by default.
- If necessary, set a limit for the number of items displayed in your email in the Limit field.
- Click Add conditions.
If you are not using a Brevo plugin or if you are using other transactional parameters, you can find this information in your event logs. Learn how to find this data in our article Customize your emails using transactional parameters.
To learn more about the Repeatable content feature, read Repeat a block of items in your emails.
🧪 Step 5: Test your email
It is good practice to send a test email to ensure all the placeholders in your email template are populating correctly. But please note that only the contact attributes will be replaced with this test.
The only way to check if your order data placeholders work correctly is to test it with a real scenario: save and activate the email template, use it in your order confirmation workflow and purchase a few products. You should then receive your order confirmation email with the placeholders replaced by your order data.
Here's an example of how your order data placeholders should be replaced once your order confirmation email is sent:
✅ Step 6: Activate the email template
Once you are done creating your order confirmation email template, click Save & Activate. You will now be able to select it in your order confirmation workflow.
🔨 Step 7: Build your order confirmation workflow
Now that you have created your order confirmation email template, the next step is to build your order confirmation workflow to automatically send an email when a contact makes a purchase on your website!
To learn how to build an order confirmation workflow, check out Order confirmation - Part 2: Set up an order confirmation workflow.
⏩ What's next?
- Order confirmation - Part 2: Set up an order confirmation workflow
- WordPress plugin - Installation and setup
🤔 Have a question?
If you have a question, feel free to contact our support team by creating a ticket from your account. If you don't have an account yet, you can contact us here.
If you’re looking for help with a project using Brevo, we can match you with the right certified Brevo expert partner.