Building a Template Using Dyspatch Features

February 15, 2018

Dyspatch provides an intuitive editor which allows you to build and modify your templates. This guide will list some of the features of Dyspatch and how to utilize them upon building your email. New to building emails? Read our Best Practices for Building an Email guide!

Dyspatch Snippets

Snippets are perfect for when you have repeated blocks of code across multiple email templates. For example, a common use case for Snippets would be the headers and footers of your email. Both of these are used to maintain consistency across all of your emails which makes them an ideal candidate for Snippets. If you ever need to edit your header, instead of editing every individual email to adjust certain aspects like colors, links, or copy, all you would need to do is modify the single snippet for the changes to be reflected in your emails.

Best of all, this is simple to do! Create a snippet:

Snippet Example

And simply reference the snippet in your template:

{% snippet "A Snippet" %}

To learn more about snippets, read our Introduction to Snippets article. Follow our example guide here to create your own snippet components!

Dynamic Email Content

Personalizing the content of an email is important to help convey the message of your email. Implementing the use of dynamic content provides you a way to personalize your emails more then just adding a first name.

Dyspatch makes use of the powerful Jinja Templating language, which provides the ability to add conditional logic for your emails. As long as your team has the data for a customer, the email will render with whatever content you'd like for that customer.

For example, you can personalize an email using the customer's location, products viewed, previous purchases, etc. This will allow you to display content tailored to the customer's interest, helping to drive conversions.

Dyspatch uses Jinja version 2.10.

Testing with Sample Data

In the template editor, there is a tab called Sample Data. This section provides you the ability to preview your template variables with a test data set. You can customize this data set to what ever variables you have in your email template and will give you a better understanding of what the email will look like with actual content.

The sample data in this tab will only work if the JSON is properly formatted.

Template:

Hi, {{ first_name }}!

Thanks for purchasing!
Here is a summary of your order:

Item: {{ item.name }} 
Add on: {{ item.desc }}
Quantity: x{{ item.quan }}

Total: ${{ item.price }}

Sample Data Tab:

{
  "first_name": "Bill",
  "item": {
    "name": "Cupcakes",
    "desc": "With Sprinkles!",
    "quan": 12,
    "price": 24.56
  }
}

Preview (Results):

Hi, Bill!

Thanks for purchasing!
Here is a summary of your order:

Item: Cupcakes 
Add on: With Sprinkles!
Quantity: x12

Total: $24.56

Test Emails on Email Clients

When building a template the key to success is making sure you test it. Testing can range from all aspects of the email, from the structure, CSS formatting, proper button styling, copy, etc.

We recommend testing what your template will look like across multiple email clients. Dyspatch Device Testing provides a great and simple way of previewing your email across many different email clients.

Didn't find what you're looking for?

Ask our support team, we're here to help!

Contact Support