Working with Email Templates


Create Email Templates
Existing Sample Templates
Edit Email Templates
Common Field Names and Code Examples
Manually Send Email Templates
Create Rules to Automatically Send Email Templates


With Order Desk, you have the ability to create unique email templates for your customers, your vendors, your staff, yourself or anyone who needs to be notified regarding orders. These emails can be sent out automatically based on certain events and conditions with your orders. Each email template can be customized to show the information you want pulled from the order and can be designed to fit your brand.

Some examples of email templates commonly set up are for shipment notifications, dropship notifications for a vendor, order notifications for a store admin, order confirmations for a customer, potential fraud notifications for a store admin, order summaries, and thank you emails for a customer. If you have a need to send an email to someone based on the information in an order, you can set up a template to make it happen.

This guide will go over how to create and edit email templates, as well as how to set them up to be sent.

Create Email Templates

To create an email template, look under the Settings menu in the left sidebar and click on Templates.

To create your first email template, under the Email Templates section, click on Add New Email Template.

After clicking to add a new template, the default Shipment Notification template will open up on the screen:

From here, you can either use this template as is, delete it and replace it with another template, or edit it to include the information you want.

Existing Sample Templates

We have a few existing sample templates already. Feel free to copy and paste any of these to use as your email templates or to edit them to customize your own template design.

These sample templates can be copied from here. Please note that because receipt templates handle multiple orders and email templates are only meant to pull data from one order at a time, the code for each uses a slightly different syntax. Pulling code from a receipt template and pasting it into an email template, or vice versa, will typically not work without changing the way that data is called.

Edit Email Templates

Once you've created the default Shipment Notification template, if you want to edit or replace the body of the template, you'll need at least some knowledge of HTML.

Tip: Copying and pasting email templates from other apps or websites will not work. Each Order Desk email template is unique to the code and field names used in Order Desk. If you aren't familiar with code and need to completely overhaul one of the sample templates, we recommend working with a designer or developer.

There are three sections to the template page:

The template fields and email overrides at the top:

Each of these fields is listed below with a description of their purpose.

Template Name: name your template something easy to remember and to identity it by so when you have to select it from a list of templates in the Rule Builder or from the email dropdown, you'll know which is which.

Email Subject: this will be the subject of the email that is sent to your recipients.

From Name Override: put in the name of the person or store you want this email to come from if you don't want it to be from the name of your Odrer Desk store.

From Email Override: put in the email address you want this template to come from if you don't want it to use your customer facing store email that is set in your Store Settings.

Email Delivery Override: add the email address this template is intended for if different from the customer's email address. If no address is added here, this template will be sent to the customer.

Attachment Field Names: if any URLs have been added to your order metadata or checkout data fields, you can add the field names for that data here and they'll be included as attachments to your email. For example, you can create a pdf from an order receipt and attach it to the email.

The code itself:

This is the code that creates the email template and will need to be edited if you want to change the order data pulled into the template or the message displayed in the email. For a list of field names and a few examples of code that can be added to the templates, scroll down to the next section.

The Send Preview Email at the bottom:

When working on your edits, you can send yourself a preview email using an actual order from your store. This is a good way to check that your code is working as expected and see what your intended recipients will receive.

To send a preview of your email template, you can put in your email address and an order number:

If the code is formatted properly, when you click Send Email, you'll immediately see a green SENT message, and the email template will be sent to the address in the Send To Email field:

If any part of the code isn't formatted correctly (loops aren't properly closed, etc.), you'll see a little spinning icon instead, and the email will not be sent. When this happens, refresh the page and check your code for any errors before trying to send the preview again.

Common Field Names and Code Examples

Tip: For a list of common field names used in Order Desk, please refer to this reference guide

The most common field names used in email templates tend to be:

{{ store_name }} - this will pull in your Order Desk store name anywhere it is used in the template
{{ source_id }} - this is the Order ID (also known as the Order Number)
{{ }} - the product name
{{ item.code }} - the product SKU
{{ item.quantity }} - the quantity ordered of an individual product
{{ item.price }} - price of the product

{{ shipping.first_name }}
{{ shipping.last_name }}
{{ shipping.address1 }}
{{ }}
{{ shipping.state }}
{{ shipping.postal_code }}

Adding Item Variations

{{ item.variation_list }} - as an example where the variation "size" is used:

Use this code to pull the variation into the email template:

{% if item.variation_list|length > 0 %}
{% if item.variation_list['size'] is defined %}
Size: {{ item.variation_list['size'] }}
{% endif %}

Adding Item Metadata

{{ item.metadata }} - as an example where a metadata field for "image" is used (with a link to the image as the value):

To add the image to the email template, use this code:

{% if item.metadata.image is defined %}
<img src="{{ item.metadata.image }}" width="100">
{% endif %}

Adding a Logo Image

To add your logo image to the header of an email, copy and paste this code into your template (replace "https://www..." with a direct link to your image).

<div class="header_logo"><img src="https://www..." width="250" alt="{{ store_name }}"></div>

Be sure to use a secure image that is stored on a site with an SSL certificate (where the URL uses https instead of http). If you need assistance creating a secure link, ask Order Desk support for assistance.

Adding Inventory Cost of Items

To add the inventory cost of your items to an email template, use this code:

{{ (item.quantity * item.metadata.inventory_cost)|money_format }}

Adding Internal Order Notes

To add your internal order notes, use this code:

{% for note in order_notes %}
<p>{{ note.content }}</p>
{% endfor %}

Manually Send Email Templates

Once at least one email template has been created in your Order Desk store, you can go into any order and click on the email icon to send an email. The order details will also need to have the customer's email address included (even if the email template you are sending has an email delivery override) for this option to be available.

If you only have one template, you will get a popup screen of that template and the option to edit and send it:

If you have more than one template, the email icon will be a dropdown to choose the template you want to send. Choosing the template will pop up the same dialog box with the option to edit and send the email.

Create Rules to Automatically Send Email Templates

Instead of sending emails manually, it is more efficient to create rules that will automatically send your email templates when certain events happen to orders (when they are imported, confirmed, shipped, etc.)

  • If you want to send a shipment notification email with tracking details to your customers, please read through this guide for complete instructions.
  • If you want to send a dropship email to a vendor, please read through this guide for complete instructions. Otherwise, continue reading this guide for general instructions on setting up rules to send out email templates.

With at least one template created in your Order Desk store, you can now set up a rule to send it. Look under the Settings menu in the left sidebar and click on Rule Builder.

In the Rule Builder, you'll first choose an event that needs to happen to trigger your email going out. This can be anything from when Order is Imported (good for notifying customers, vendors or people on your team about the new order), when Shipment is Added (good for notifying customers of their tracking details), or when Folder is Changed (perhaps you want to send out an email based on which folder an order is moved into), etc.

Once you've selected the event, click Continue to build the rest of the rule.

You may need to set up conditions depending on the event chosen or if only certain orders will need to trigger emails. Conditions let you specify the exact information in or about an order so your email won't go to every order that fits your event. For instance, if your event is when Folder is Changed, you'll want to set up a condition to specify which folder the order moved into, otherwise any order that is moved into a new folder could trigger the email.

In this example, we'll add the condition that the Folder ID is 21879. The ID can be found in the URL for the folder.

You can add more than one condition as well. Perhaps you have orders coming in from Etsy, Shopify and Amazon Marketplace, but you only want orders in this specific folder that came from Etsy to receive the email. Set up an additional condition specifying Etsy as the order source for this:

Now it's time to set the action, which is to send the email template. In most cases, you'll choose the action Send Email to Customer even if you're not sending the email to the customer. Remember, if the email is meant for someone other than the customer, you should have added that email address to the Email Delivery Override section in the template. If no email address is set there in the template, the email will go to the customer's email address.

The exception to this is if you choose Send Email to Admin instead for your action. In this case, unless the Email Delivery Override in the template has been set to another email address, the email will go to the admin's email address set in your Store Settings.

Additional actions can also be added to the rule.

Name and save your rule. Now any time this particular event happens, this rule will look at the conditions you've applied, if any, make sure they match the orders, and send the email template when they do.

Tip: For more information on the Order Desk Rule Builder, please refer to our Getting Started guide on customization.

Still need help? Contact Us Contact Us