Learn how to use variables and create custom Message Center templates.
In the Message Center, under the Templates tab, you will find the transactional email templates sent to your clients.
Some of them are fired when the status of an order changes. For example:
- Order Confirmation: email sent when the order was made successfully.
- Billed Order: email sent when the order is billed.
- Delivery canceled: email sent when the order is canceled.
You can customize all of the Message Center templates, and you have a series of variables at your disposal that allow you to add data to the email dynamically.
These variables are JSON properties in the JSON Data field and can be used in the email's HTML. Insert them into double keys using the following format: {{variable}}
Example
Examples of JSON Data will only appear in the templates when you develop the desired action in your store. If you have not transacted an order, a recurrence, or any other action, JSON Data will be blank.
Let's say you want to enter the carrier's name in the "product sent" email.
To do this, enter the "product sent" template and search for the' courier' property in the JSON Data field.
Note that the courier
property is inside the package
object. Therefore, you need to enter it as follows:
{{package.courier}}
As you see, the sample value ("Transportadora Teste Courier S.A.") was inserted in the preview screen, below the HTML and JSON Data fields.
Other order email variables
Among the properties of order JSONs that can be used as variables in transactional email templates are:
_24{_24 "data": {_24 "h-0": "Properties",_24 "h-1": "Definition",_24 "0-0": "`courier`",_24 "0-1": "Courier",_24 "1-0": "`invoiceNumber`",_24 "1-1": "Invoice number",_24 "2-0": "`invoiceValue`",_24 "2-1": "Invoice value",_24 "3-0": "`invoiceUrl`",_24 "3-1": "Invoice URL",_24 "4-0": "`issuanceDate`",_24 "4-1": "Date of issue",_24 "5-0": "`trackingNumber`",_24 "5-1": "Order tracking number",_24 "6-0": "`invoiceKey`",_24 "6-1": "Invoice access key",_24 "7-0": "`trackingUrl`",_24 "7-1": "Order tracking URL (informed by the carrier)"_24 },_24 "cols": 2,_24 "rows": 8_24}