Order confirmation - Part 1: Create an order confirmation email template

In this article, we will explain how to create and personalize an order confirmation email that will be sent through a workflow.

❗️ Important note for WooCommerce users
If you use the Brevo plugin for WooCommerce and want to send your order confirmation email directly through WooCommerce (and not through a workflow), check our dedicated article: WooCommerce plugin - Create an order confirmation email to send through WooCommerce. The placeholders used to personalize the email template are not the same as the ones stated in this article.

Before you start

⚙️ Step 1: Create your order confirmation email template

💡 Good to know
The settings of your email template (subject line, preview text, From email, etc.) will be applied every time it is sent through your order confirmation workflow.

To create your order confirmation email template:

  1. Go to Campaigns > Templates.
  2. Click New Template to create a new email template.
  3. Configure the settings just like a regular email template.
    Note: you can personalize the email subject line and the preview text using contact attributes.
  4. 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.

mceclip0.png

🖋️ 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 }}.

mceclip5.png

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:

mceclip0.png

Insert placeholders for product images

To insert product images in your email template using the Drag & Drop Editor:

  1. Drag and drop a design block that contains space for an image into your email template.
    mceclip6.png
  2. Click the image block to open the image settings.
  3. In the Insert from URL field, insert the product image placeholder.
    mceclip8.png

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:

  1. Drag and drop a design block that contains space for an image into your email template.
    mceclip6.png
  2. Hover over the image block.
  3. Click the link icon.
  4. In the Link target field, insert the URL placeholder.
    2021-09-01_16-24-43__1_.png

Add a link to text

To add a link to text using the Drag & Drop Editor:

    1. Highlight the text you want to turn into a URL.
    2. Click the link icon.
    3. In the Link target field, insert the URL placeholder.
      2021-09-01_16-28-34__1_.png
❗️ Important 
If you have added placeholders to display multiple products or contents in a row, you must enable the Repeat Block feature to ensure that your email template can display multiple products and interpret the data sent from your website to Brevo. To do so, follow the instructions in the section below Step 4: Display and interpret order data.

🧐 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:

  1. In your email template, click the section that contains placeholders for items data.
  2. From the side panel, open the Repeatable content section.
    automation_order-confirmation_repeatable-content_en-us.jpeg
  3. 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.
      mceclip4__2_.png
  4. If necessary, set a limit for the number of items displayed in your email in the Limit field.
  5. 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

💡 Good to know
Make sure that you added the email address you are using to test your email as a contact in your Brevo account. Their contact attributes will be used to populate the data of each placeholder. We generally advise using a test list.

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:

2021-09-02_17-04-06.png

✅ 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?

🤔 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.

💬 Was this article helpful?

0 out of 3 found this helpful