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 are using the Sendinblue plugin for WooCommerce and want to send your order confirmation email directly through WooCommerce (and not through a workflow), check out 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.
    2021-09-01_15-40-03__1_.png
  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.

To design your email template:

  1. Select the editor you want to use (New Drag & Drop Editor or Classic Drag & Drop Editor).
  2. 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 Sendinblue 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 examples below, we have included a personalization of the contact's first name using the placeholder {{ contact.FIRSTNAME }}.

New Drag & Drop Editor Classic Drag & Drop Editor
mceclip5.png mceclip4__1_.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 Sendinblue plugin, the placeholders are standardized. To learn if your plugin automatically creates track events, check out our dedicated article Which Sendinblue 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 Sendinblue'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 Sendinblue 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

In the New Drag & Drop Editor

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

  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

In the Classic Drag & Drop Editor

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

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

Insert placeholders for product or cart links

In the New Drag & Drop Editor

Add a link to an image

To add a link to an image using the Drag & Drop Editor (New):

  1. Drag and drop a design block that contains space for an image into your email template.
    mceclip6__1_.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 (Classic):

    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

In the Classic Drag & Drop Editor

Add a link to an image

To add a link to an image using the Drag & Drop Editor (Classic):

  1. Drag and drop a design block that contains space for an image into your email template.
    mceclip9.png
  2. Click the image space to open the image settings.
  3. In the Link field of the image settings, insert the URL placeholder.
    mceclip11.png

Add a link to text

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

  1. Highlight the text you want to turn into an URL.
  2. Click the link icon.
  3. In the URL field of the image settings, insert the URL placeholder.

    2021-09-01_16-40-20__1_.png

🧐 Step 4: Display and interpret order data

💡 Good to know
Our Dynamic list option is now called Repeat block and is available in both Drag & Drop editors.

After adding your placeholders in your email template, you must enable the Repeat block 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 Sendinblue.

In the New Drag & Drop Editor

To display and interpret your items data using the Drag & Drop Editor (New):

  1. Hover over the block that contains placeholders for items data.
  2. Click the Repeat block icon.
    mceclip1__1_.png
  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 Sendinblue 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 Sendinblue 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 Loop.

If you are not using a Sendinblue 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.

In the Classic Drag & Drop Editor

To display and interpret your items data using the Drag & Drop Editor (Classic):

  1. Select a block that contains placeholders for items data
  2. Click the Repeat block feature in the settings column
  3. Below the Repeat block feature, in the Variable names and What parameter contains the concerned attributes? fields, enter the following information:
    • variable: 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 Sendinblue using one of our plugins, the name of the variable array is item by default.
    • parameter: 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 Sendinblue using one of our plugins, the name of the variable array is items by default.
  4. If necessary, set a limit for the number of items displayed in your email in the Limit field.
    RAC_step_2_image_5.png

If you are not using a Sendinblue 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 Repeat block 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 Sendinblue 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?