Chord OMS
Chord OMS Overview

Transactional Emails

18min

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

Stock Requests

  • Item Back In Stock Email: back_in_stock

Reimbursements

  • Order Reimbursement Email: reimbursement_email

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

Referrals

  • Reward Confirmation Email‌: reward_confirmation
  • Referral Prompt Email: referral_prompt

Orders

  • Order Confirmation Email: confirm_email
  • Order Cancelation Email: cancel_email
  • Order Cross Sell Email: cross_sell_email
  • Checkout Abandoned Email‌: abandoned_email

Cartons/Shipments

  • Order Shipped Email: shipped_email

Gift Cards

  • Gift Card Email: gift_card_email

Example(s) Content Types in Contentful

Document image


Inky

In order to be more flexible in creating emails, we are using Inky 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).

Document image


Note: You can still use HTML‌‌!

Variables

{{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}}



Example one:

Document image


Example two:

Document image




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}}begins a "person" section while {{/person}} ends it. More information here



Additional Information

The main way to get started is with Foundation for Emails and CSS styled emails without the hassle

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 and this repository is based on their foundation/foundation-emails-



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.

Document image




If you have questions or need more information, please reach out to [email protected]