Order comments email template

We use this template for the email comments sent via a completed order's details in your dashboard. You can use the order details COMMENTS section to communicate via email with a customer regarding their completed order. The written message you input in the order details comments will be automatically inserted into this email template.

Customizing the default template

When you enter the email editor for the first time, you'll have a default template to get started. The actual email related to this template is sent through the dashboard, under a completed order's details. From there, the message you enter will replace the message variable in your template.

The template editor example below includes the message variable you can modify under an order's details.

---
Subject: Information regarding your order {{ order.invoiceNumber }} on {{ settings.businessAddress.company }}.
---

<!DOCTYPE html>
<html>
<head></head>
<body style="font-family: Arial; font-size: 12px;">
    <p>
        {{! You have access to the whole order information using the `order` object. Might be helpful to show some contextual information }}
        Hey {{ order.billingAddress.fullName }},
    </p>

    <div>
        {{ #if order.invoiceNumber }}
            A comment has been added to your order
            <a href="{{ settings.orderUrl }}">
                <strong>{{ order.invoiceNumber }}</strong>
            </a>
            on <strong>{{ settings.businessAddress.company }}</strong>
        {{ /if }}
    </div>

    <blockquote style="margin: 1em 0; padding: 1em; border: solid 1px #aaa">
        {{! Use thie variable `message` to display the message that you enter in the dashboard when consulting an abandoned cart details screen.}}
        {{{ message }}}
    </blockquote>

    <div>
        If you have any questions regarding this message, reply to this email directly.
    </div>
</body>
</html>

The template receives:

Variable Type Notes
context string Email, Pdf or Html.
settings object Store settings — see Settings. settings.orderUrl links the customer to the order.
order Order The order the comment was added to.
message string The comment you enter in the order's details.

What you can access

Path Type
order Order
order.items[] Item
order.billingAddress Address
order.shippingAddress Address
order.summary Summary
order.summary.taxes[] Tax
order.discounts[] Discount
order.customFields[] CustomField
order.refunds[] Refund

Minimal example

{
  "context": "Email",
  "message": "Thanks for your order — here is an update.",
  "settings": {
    "businessAddress": { "company": "snipcart.com" },
    "orderUrl": "https://snipcart.com#!/orders/..."
  },
  "order": {
    "invoiceNumber": "SNIP-1001",
    "email": "john.doe@example.com",
    "billingAddress": { "fullName": "John Doe" },
    "items": [{ "name": "Geek T-Shirt", "quantity": 2, "totalPrice": 100 }]
  }
}

Was this article helpful?