In Zaius, templates enable marketers to:

  • Personalize content to the individual
  • Reuse email and push content across campaigns
  • Build dynamic content with a powerful template engine

Creating a new template

The Zaius template editor enables marketers to build content in a WYSIWYG editor. Channels that are currently supported by our editor are:

  1. Email Templates
  2. Mobile Push Templates

Templates can also be edited in "Source" mode for email which allows a marketer to cut and paste HTML directly as well as use our template language to create dynamic templates.

Personalizing a template

Personalizing a template can be done by typing in "##{{" in the WYSIWYG mode or in source mode. This will allow you to select dynamic data elements.

The most common use case is to use a person's first name would be to type the following into your template

{{ customer.first_name }}

Any field in our basic schema for customers can be pulled into a template which gives the marketer ultimate control over the content in the email.

Using product, events and category interaction linked to customer behavior

Zaius also has a powerful ability to surface very specific details about the events, products and categories that this customer has interacted with in the context of the segment.

Often you want to get all of the items that match a particular type of activity (like all of the products a person recently abandoned). This can be done by creating a segment in the segment builder using the behavior tab see [segment builder] (doc:segmentation-overview).

Let's say you're doing a product detail abandon campaign with a behavioral segment that looks like:

  • Step 1: Viewed product detail
  • Step 2: Did not buy anything within 1 day

If you want the email to include the 10 most viewed products that were abandoned you would use:

{{ behavior_name.step1.list.product(name).top }}

Zaius gives you access to some powerful features that allow you to reference a behavior and return a list of items related to it. Let's break down the statement above into the relevant pieces.


The "step" statement allows you to reference items related to the behavior. In the product detail view segment example above, I would use "step1" to begin to access the products a customer viewed.


Lists allow a marketer to bring back a number of items related to that step. Lists must be used with a modifier below like "top" which returns the top 10 most recent events related to that behavioral step.
We currently support the following modifiers to lists:

  • top: top 10, by count (most)
  • bottom: bottom 10, by count (fewest)
  • newest: most recent 10 matches, by time
  • oldest: oldest 10 matches, by time

Using Lists to access products, events.

Inside of a list, a marketer can then access all elements of their schema that apply to that step. Events and products are the most widely used. Any attribute of a product or event can be referenced in a template including the custom fields you have added.

Iterating through a list

It is possible to iterate through a list of items and print the response in your content. This example will loop through the top products and print the product's name

{% for item in behavior_name.step1.list.product(name).top %}
 {{ item.name }}
{% endfor %}

Referencing specific items in a list

You can also reference products that are in a specific position in the list by using the following statement. In Zaius, the first item in the list is in position "0". In the example below, the first item in a list will print into the content.


Advanced templates with Liquid

Our templating language is based on liquid templates that was open sourced by Shopify and the reference for how to use liquid can be found here. All of the liquid capabilities can be used.

Additional functionality

In addition to accessing customers, products and events in templates. We've also added in some additional helpful features in your templates. See Advanced Content Templates for details.


Abort can be used at any time to stop sending the message to the user. For example, if you don't have the customer first name or for any reason you want to abort the send of an individual message because of the personalized information you can include the {% abort %} tag.

{% if customer.first_name == blank %}
 {% abort %}
{% endif %}

Using templates in campaigns

Campaign Creation has a great overview of how to use templates within a campaign.

Did this answer your question?