Including order variables in the transactional email template

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 at your disposal a series of variables that allow you to dynamically add data to the email.

These variables are JSON properties that are in the JSON Data field and can be used in the email's HTML. Simply insert them into double keys, using the following format: {{variable}}

Example

🚧

Examples of JSON Data will only appear in the templates when you come up with 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 name of the carrier in the "product sent" email.

To do this, enter the "product sent" template and, in the JSON Data field, search for the courier property.

12041204

The filled-in value for this property is just an example, but you can use it in the HTML field so that when the email is sent the customer sees the carrier that is actually responsible for the order delivery.

Note that the courier property is inside the package object. Therefore, you need to enter it as follows:

{{package.courier}}

12021202

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:

Properties

Definition

courier

Courier

invoiceNumber

Invoice number

invoiceValue

Invoice value

invoiceUrl

Invoice URL

issuanceDate

Date of issue

trackingNumber

Order tracking number

invoiceKey

Invoice access key

trackingUrl

Order tracking URL (informed by the carrier)


Did this page help you?