Order Email Notifications (for customers)
On an order creation or status change an email notification might be sent. By default, there is a notification for the new order, which sends out to a customer if emails is specified:
How to customise Email notifications?
When a template is rendered there are available variables:
{
"ORDER_URL": "http://localhost:3000/thank-you/46ce25ce-37e1-4081-a737-420cb7dfe61b",
"ORDER_ID": 29,
"ORDER_PUBLIC_ID": "46ce25ce-37e1-4081-a737-420cb7dfe61b",
"ORDER_SUM": "45.00 $",
"TRACK_NUM": "",
"CUSTOMER_FULLNAME": "John Snow",
"CUSTOMER_FIRSTNAME": "John",
"CUSTOMER_COMMENT": "Some comment from John",
"ITEMS_LIST": "<div id=\"order-notification\"><div class=\"view-order-widget\" id=\"s-0\"><table class=\"table table-bordered table-hover table-striped\"><thead><tr><th class=\"item\"></th><th class=\"price\">Price</th><th class=\"qty\">Qty</th><th class=\"total\">Total</th></tr></thead><tbody><tr data-item='3650'><td class=\"item\"><a href=\"http://localhost:3000/product/chekhol-akkumulyator-odoyo-power-shell-dlya-iphone-6-6s\" target=\"_blank\" class=\"img\"><img src=\"https://dev-media.boundless-commerce.com/thumb/kirill-office-mac/i1/images/a1/ae/ace20b14fe947ff13822f97a82ac.jpeg?mode=scale&max-size=100\"></a><div class=\"desc\"><p><a href=\"http://localhost:3000/product/chekhol-akkumulyator-odoyo-power-shell-dlya-iphone-6-6s\" target=\"_blank\">Battery Case Odoyo Power+Shell for iPhone 6/6S </a></p></div></td><td class=\"price\">45.00 $</td><td class=\"qty\">1</td><td class=\"total\">45.00 $</td></tr></tbody><tfoot><tr class=\"items-total info\"><th colspan=\"2\" class=\"title\">Items total:</th><th class=\"qty text-center\">1</th><th class=\"total\">45.00 $</th></tr><tr class=\"order-total info\"><th colspan=\"2\" class=\"title\">Total:</th><th class=\"qty text-center\">1</th><th class=\"total\">45.00 $</th></tr></tfoot></table><p class=\"client-comment\">Some comment from Ivan</p></div></div>",
"ITEMS": [
{
"reserve_item_id": 553,
"reserve_id": 122,
"stock_id": null,
"qty": 1,
"created_at": "2023-11-05T11:09:35.587Z",
"completed_at": null,
"item_price_id": 597,
"price_id": 7,
"basic_price": "45.00",
"final_price": "45.00",
"discount_amount": null,
"discount_percent": null,
"item_id": 3650,
"type": "product",
"track_inventory": true,
"available_qty": 20,
"reserved_qty": 0,
"product_id": 180,
"variant_id": null,
"custom_item_id": null,
"status": "published",
"deleted_at": null,
"lang_id": 1,
"product": {
"product_id": 180,
"sku": "2667209",
"has_variants": false,
"title": "Battery Case Odoyo Power+Shell for iPhone 6/6S ",
"url_key": "chekhol-akkumulyator-odoyo-power-shell-dlya-iphone-6-6s",
"default_category_id": 105,
"manufacturer_id": 33,
"tax_status": "taxable",
"tax_class_id": null,
"url": "http://localhost:3000/product/chekhol-akkumulyator-odoyo-power-shell-dlya-iphone-6-6s"
},
"variant": {
"variant_id": null,
"sku": null,
"title": null,
"cases": null,
"size": null
},
"custom_item": {
"custom_item_id": null,
"title": null,
"price": null
},
"commodity_group": {
"group_id": 61,
"type": "material",
"not_track_inventory": false,
"vat": "noVat",
"physical_products": true,
"title": "Default Product type"
},
"image": {
"path": "images/a1/ae/ace20b14fe947ff13822f97a82ac.jpeg",
"width": 725,
"height": 725,
"src": "https://dev-media.boundless-commerce.com/thumb/kirill-office-mac/i1/images/a1/ae/ace20b14fe947ff13822f97a82ac.jpeg?mode=scale&max-size=100"
},
"prices": [
{
"point_id": 1,
"price_id": 7,
"alias": "selling_price",
"currency_id": 4,
"currency_alias": "usd",
"value": 45,
"min": null,
"max": null,
"is_auto_generated": true,
"old": null,
"old_min": null,
"old_max": null
},
{
"point_id": 1,
"price_id": 8,
"alias": "purchase_price",
"currency_id": 4,
"currency_alias": "usd",
"value": 20,
"min": null,
"max": null,
"is_auto_generated": true,
"old": null,
"old_min": null,
"old_max": null
}
],
"labels": [],
"total_price": "45.00",
"total_price_formatted": "45.00 $",
"final_price_formatted": "45.00 $"
}
],
"SITE_URL": "http://localhost:3000"
}
Templates are using Mustache syntax.
There is an example for custom Email notification:
<p>
Dear {{CUSTOMER_FULLNAME}},<br/>
Thank you so much for your order!
</p>
<p>You have selected the following items:</p>
<ul>
{{#ITEMS}}
<li>
<div>{{product.sku}} - {{product.title}}</div>
<div>
<strong>{{qty}} qty</strong>
</div>
<div>
<strong>Price: {{final_price_formatted}}</strong>
</div>
<div>
<strong>Total: {{total_price_formatted}}</strong>
</div>
</li>
{{/ITEMS}}
</ul>
<p>
Thank you,<br/>
Your Support Team
</p>