> For the complete documentation index, see [llms.txt](https://docs.chord.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chord.co/chord-oms/content-management-cms/transactional-emails-templates-variables.md).

# Transactional Emails Templates/Variables

### Introduction

Transactional Emails are the mandatory post-purchase email communications you can send to customers. These emails are content managed in Contentful or Sanity and set via our email services.‌

### Default Email Templates

**Subscriptions (email name: slug)** Subscription Reminder Email: subscription\_default\_reminder Subscription Last Chance Reminder Email: subscription\_last\_chance\_reminder

subscription\_email.json

**Stock Requests (email name: slug)** Item Back In Stock Email: back\_in\_stock

stock\_requst\_email.json

**Reimbursements (email name: slug)** Order Reimbursement Email: reimbursement\_email

reimbursement\_email.json

**Refunds (email name: slug)** (The same email template is used for refunds/reimbursements, they are two different things that coincide with a refund of money and/or an exchange) Order Refund Email: reimbursement\_email

refund\_email.json

**Referrals (email name: slug)** Reward Confirmation Email‌: reward\_confirmation Referral Prompt Email: referral\_prompt

referral\_email.json

**Orders (email name: slug)** Order Confirmation Email: confirm\_email Order Cancelation Email: cancel\_email Order Cross Sell Email: cross\_sell\_email Checkout Abandoned Email‌: abandoned\_email

order\_mail.json

**Cartons (email name: slug)** Order Shipped Email: shipped\_email

carton\_mail (shipped email).json

**Gift Cards (email name: slug)** Gift Card Email: gift\_card\_email

gift\_card\_email.json

![](https://3559351341-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGejRW1RLC9yasX56Xzxu%2Fuploads%2Fgit-blob-dbb9ecc7c61c49ead9167194da99170e5baff586%2Ftransactional-emails-1.jpg?alt=media)

### Inky

In order to be more flexible in creating emails, we are using [Inky](https://github.com/foundation/inky-rb) as a templating language to essentially convert complex HTML tags into a much simpler approach.‌Inky simplifies the process of creating HTML emails by expanding out simple tags like and into full table syntax.

With Inky, we can inject variables into our HTML templates that will be replaced with values from the order when they are compiled into HTML (see {{ship\_address.firstname}} in the example below).

![](https://3559351341-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGejRW1RLC9yasX56Xzxu%2Fuploads%2Fgit-blob-9a41181f1c6bd5e7e9755d3768ecdeaf8f524834%2Ftransactional-emails-2.png?alt=media)

{% hint style="success" %}
**Note**: You can still use HTML‌‌!
{% endhint %}

### Variables

{{ship\_address.firstname}}

{{#first\_package\_tracking.url}}

{{#line\_items}}

{{name}

{{[#options\_text](https://paper.dropbox.com/?q=%23options_text)}}

{{[#is\_bundle](https://paper.dropbox.com/?q=%23is_bundle)}}

{{/parts}}

{{quantity}}

{{price}}

{{[#promo\_total](https://paper.dropbox.com/?q=%23promo_total)}}

{{[#p](https://paper.dropbox.com/?q=%23promo_total)ayment\_charge}}

{{shipment\_total}}

{{[#store\_credit\_applied](https://paper.dropbox.com/?q=%23store_credit_applied)}}

{{ship\_address.full\_name}}

{{ship\_address.address1}}

{{[#ship\_address](https://paper.dropbox.com/?q=%23ship_address).address2}}

{{ship\_address.city}},

{{ship\_address.state}}

{{ship\_address.zipcode}}

{{shipping\_method}}

{{[#trackings](https://paper.dropbox.com/?q=%23trackings)}}

{{[#url](https://paper.dropbox.com/?q=%23url)}}

{{order\_total\_after\_store\_credit}}

{{purl\_link}

{{email}}

{{credit}}

{{reimbursement\_total}}

{{updated\_order\_total}}

{{credit\_balance}}

{{order.subscription\_order,}}

{{order.spree\_channel.name}}

{{ order.state}}

{{order.display\_item\_total.to\_s}}

{{order.display\_tax\_total.to\_s}}

{{order.display\_total\_applicable\_store\_credit.to\_s}}

{{payment\_information}}

{{order.cart\_url.to\_s}}

{{order.subscription\_in\_cart?}}

{{fully\_cross\_sold\_line\_items}}

{{partially\_cross\_sold\_line\_items}}

{{non\_cross\_sold\_line\_items}}

{{order.metadata}}

{{order.shipments.first&.shipping\_method&.code}}

{{shipping\_method\_name}}

{{order.display\_order\_total\_after\_store\_credit.to\_s}}

Example 1:

![](https://3559351341-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGejRW1RLC9yasX56Xzxu%2Fuploads%2Fgit-blob-d3a0483af336295f6d844e6e536c19e82b909a38%2Ftransactional-emails-3.png?alt=media)

Example 2:

![](https://3559351341-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGejRW1RLC9yasX56Xzxu%2Fuploads%2Fgit-blob-e7b4f5f29ff275e95aff0d225cadb8df185638c4%2Ftransactional-emails-4.png?alt=media)

### Sections

Sections render blocks of text one or more times, depending on the value of the key in the current context.A section begins with a pound and ends with a slash. That is {{[#person](https://paper.dropbox.com/?q=%23person)}}begins a "person" section while {{/person}} ends it. More information [here](https://mustache.github.io/mustache.5.html)

### Additional Information

‌The main way to get started is with [Foundation for Emails](http://foundation.zurb.com/emails) and [CSS styled emails without the hassle](https://github.com/fphilipe/premailer-rails)

A tool to help implement and test customizations to Chord email templates.

If you can achieve your needs by overriding a few styles within the Contentful Email's Custom Styles field, this tool isn't necessary. It exists for those looking to completely customize the branding of their email templates.

Chord email templates are powered by [Foundation for Emails](https://get.foundation/emails/docs/) and this repository is based on their [foundation/foundation-emails-](https://github.com/foundation/foundation-emails-template)

{% hint style="success" %}
If you have questions or need more information, please reach out to <help@chord.co>
{% endhint %}

##


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.chord.co/chord-oms/content-management-cms/transactional-emails-templates-variables.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
