Using objects in emails
In the article
Object definitionOrder objectOrder item objectAddress objectShipment objectCustomer objectShare Your FeedbackObject definition
Twig syntax provides a simple, powerful way to
include dynamic content, directly within email templates. Twig syntax allows all of
this dynamic templating to occur outside of code, meaning changes are done quickly in the
template, with no update to a code base required.
Order object
The order object contains the following fields and lists
{
"id": String,
"order_number": String,
"externalId": String,
"type": String,
"total": Float,
"currencyCode": String,
"currency": String,
"status": String,
"email": String,
"telephone": String,
"channelName": String,
"isGuest": Boolean,
"isGift": Boolean,
"customerNote": String,
"user": "The user object",
"customer": "The customer object",
"billingAddress": "The billing address",
"shippingAddress": "The shipping address",
"shipments": "A list of shipments",
"orderItems": "A list of order items",
}
Order item object
The order item object contains the following fields
{
"id": String,
"sku": String,
"productId": String,
"name": String,
"couponCode": Float,
"weight": Float,
"totalWeight": Float,
"qtyOrdered": Integer,
"price": Float,
"total": Float,
"discountPercent": Float,
"discountAmount": Float,
"taxPercent": Float,
"taxAmount": Float,
"productType": "String",
"additional": "String",
}
Address object
The address object contains the following fields
{
"id": String,
"type": String,
"countryCode": String,
"administrativeArea": String,
"locality": String,
"dependentLocality": String,
"postalCode": String,
"sortingCode": String,
"addressLine1": String,
"addressLine2": String,
"organization": String,
"givenName": String,
"additionalName": String,
"familyName": String,
}
Shipment object
The Shipment object contains the following fields
{
"id": String,
"status": String,
"price": Float,
"totalQty": Integer,
"totalWeight": Integer,
"carrierCode": String,
"carrierTitle": String,
"trackNumber": String,
}
Customer object
The customer object contains the following fields
{
"id": String,
"customerId": String,
"type": String,
"firstName": String,
"lastName": String,
"email": String,
}
Share Your Feedback
Let us know how we’re doing! Please rate this page:
If you have a question that needs an answer, please
contact support.
Thanks for helping us improve our docs!