Model Documentation for Order Object Mailers & SMS
If you want to create your own mailer, you should familiar with some order object keys which are used in the mailers. For eg: If you want to add an order id in your custom mailers, without using the object key you can't do this.
As some objects/data, you can't put directly into your mailers. To bind the data you have to know how to use the object key with these data. Will start with the Order Mailers. What are the basic keys which are needed in the Order mailers: 1. Customer Name 2. Order ID 3. Project URL 4. Item Name 5. Quantity 6. Store Price
Object | Key |
Customer Name | {{account.name}} |
Order ID | {{order.numId}} |
Project URL | {{project.siteUrls.[0]}} |
Item Name | {{#order.items}} {{name}} |
Quantity | {{/order.items}} {{quantity}} |
store Price | {{product.storePrice}} |
These are the basic keys that are used in the order mailers like Order confirmation mailer, canceled mailer, Ready to ship mailer, Shipped mailer, Return Requested mailer, and so on. Next will learn about the object keys that are used in other mailers. 2. Invoice Mailer Learn about the basic object keys which are used in the Invoice mailer template.
Object | Key |
Project Name | {{project.storeAddress.fullName}} |
Address1 | {{project.storeAddress.address1}} |
Address 2 | {{project.storeAddress.address2}} |
Project city | {{project.storeAddress.city}} |
Project state | {{project.storeAddress.state}} |
Project country | {{project.storeAddress.country}} |
Pincode | {{#if project.storeAddress.postal}} Pincode- |
{{project.storeAddress.postal}} {{/if}} {{#if gstin}} | |
Payment Method Type like COD | {{ORDER.BILLING.PAYMENTMETHOD.TYPE}} |
Customer Name | {{order.billing.address.fullName}}, |
Customer Address1 | {{order.billing.address.address1}}, |
Customer Address2 | {{order.billing.address.address2}}, |
Customer city, state, country | {{order.billing.address.city}},{{order.billing.address.state}}, |
{{order.billing.address.country}} | |
Pincode | {{#iforder.billing.address.postal}} Pincode- |
{{order.billing.address.postal}} {{/if}} | |
Delivery Date & Time | {{time24To12 order.shipping.slot.start}} To {{time24To12 |
order.shipping.slot.end}} ({{order.shipping.slot.date}}) | |
Order Item Serial No | {{index}} |
Order Item Description | {{name}} ({{product.sku}}) {{if product.hsn}}HSN:({{product.hsn}}){{/if}} |
Order Item Unit Price | {{currency}}{{product.storePrice}} |
Order Qty | {{quantity}} |
Net Amount currency & Price | {{currency}} {{item Total}} |
Tax Rate | {{#if product.taxPercent}}{{product.taxPercent}}%{{else}}-{{/if}}A |
Amount in words | Amount in words: {{totalInWord}} |
3. Abandoned Cart Mailer If you want to look at the cart of your customer, you can go with Abandoned Cart Mailer. In the attached screenshot; you can check which object keys are required.
Last updated