> 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/chord-oms-overview/transactional-emails.md).

# Transactional Emails

## 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 sent via Chord's email services.‌

## Default Email Templates

(**email name:** *slug*)

**Subscriptions**

* **Subscription Reminder Email**: *subscription\_default\_reminder*
* **Subscription Insufficient Stock**: *subscription\_ insufficient\_stock*
* **Subscription Last Chance Reminder Email**: *subscription\_last\_chance\_reminder*
* **Subscription Installment Failed**: *subscription\_installment\_failed*
* **Subscription Installment Payment Failed**: *subscription\_installment\_payment\_failed*

subscription\_email.json

**Stock Requests**

* **Item Back In Stock Email**: *back\_in\_stock*

stock\_requst\_email.json

**Reimbursements**

* **Order Reimbursement Email**: *reimbursement\_email*

reimbursement\_email.json

**Refunds** (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**

* **Reward Confirmation Email‌**: *reward\_confirmation*
* **Referral Prompt Email**: *referral\_prompt*

referral\_email.json

**Orders**

* **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/Shipments**

* **Order Shipped Email**: *shipped\_email*

carton\_mail (shipped email).json

**Gift Cards**

* **Gift Card Email**: *gift\_card\_email*

gift\_card\_email.json

### Example(s) Content Types in Contentful

![](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

{% hint style="info" %}
{{ship\_address.firstname}} {{#first\_package\_tracking.url}} {{#line\_items}} {{name} {{#options\_text}} {{#is\_bundle}} {{/parts}} {{price}} {{quantity}} {{#promo\_total}} {{#payment\_charge}} {{shipment\_total}} {{#store\_credit\_applied}} {{ship\_address.full\_name}} {{ship\_address.address1}} {{#ship\_address.address2}} {{ship\_address.city}} {{ship\_address.state}} {{ship\_address.zipcode}} {{shipping\_method}} {{#trackings}} {{#url}} {{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}}
{% endhint %}

**Example one:**

![](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 two:**

![](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)

## Disabling Mailers

### Globally

You may decide to disable our transactional templates. Instead, you can use `Email Queued` events to trigger your own transactional emails with an external service like Klaviyo or Iterable.

Disabling all transactional emails is accomplished by setting `TRANSACTIONAL_EMAILS_ENABLED` to `disabled` . This setting is configurable on a per-store basis in the **Environment Variables** section in **Settings / Store**

### Disable transactional emails individually

You also have the option to deactivate specific email template. This functionality allows you to enable or disable transactional emails individually by incorporating an optional boolean field, "enabled," into the Email content type within Contentful. If this field is present and set to "no," the respective email template will be deactivated.

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

{% 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/chord-oms-overview/transactional-emails.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.
