Using variables and twig expressions

In some of the widgets you can insert variables to create the templates you need. In the emails that are sent to your customer, the variables will then be replaced with the correct content.

Besides the variables, the tables in the Available variables chapter contain also the corresponding twig expressions. You need twig expressions both for the subject line of your email template and for the code widget because it is not possible to use variables in there. And in expert mode, it is of course also possible to use twig expressions.

1. Twig expressions for the code widget and the subject line

Besides the variables, you can find also the twig expressions in the Available variables chapter. Twig expressions can be used in the code widget and in a template’s subject line.

1.1. Twig expression in the subject line

Variables cannot be inserted in the template’s subject. It has to be the twig expression belonging to the variable.
If you want to use a twig expression in the template’s subject line, this expression has to be surrounded by double curly brackets.

Example: If you want to display the shipping service provider in your template’s subject, insert the corresponding twig expression in the template’s subject line as follows: {⁠{order.formattedShipping.providerName}⁠}.

Click on integration_instructions (Show variables) at the end of the subject line to open the variable list. You can either search for the desired variable using the categories and sub-categories or you enter the variable’s name into the search field. When you click on the desired variable, the corresponding twig expression including the double curly brackets will be inserted in the subject line.

For further code examples for the subject, refer to the Code examples user manual page.

1.2. Twig expression in the code widget

If you use if queries or for loops in your code widget, for example, there is no need to insert double curly brackets in the if query itself, but in the body text. For further information about twig, refer to the Twig documentation.

Insert appropriate twig expression via variable list

If you have inserted the code widget into your template and open it by clicking on , the twig expression will be directly inserted in the code editor once you click on one of the variables from the list.

Refer to the Code examples for the code widget chapter on the Code examples page to find some if queries and for loops that you can simply copy to your code widget.

2. Available variables

The available variables for the EmailBuilder are grouped into the following categories and sub-categories: Click on an entry in the list to be directly forwarded to the section where the variables and the corresponding twig expressions for the respective category or sub-category are listed.

2.1. Variables: Order

In this category, you can find all order-relevant sub-categories.

Click on one of the following links to be forwarded directly to the corresponding sub-chapter:

2.1.1. Order / Subscription

Table 1. Variables in the Order / Subscription sub-category
Name of the variable Explanation Twig expression

Subscription: Number of executions

Number of orders that were created based on a subscription.
Example: If the subscription was started in May 2021 with an interval of 3 months, 4 orders were created until May 2022. In this case, this variable would return the value 4 in the email template.

order.formattedSubscription.numberOfExecutions

Subscription ID

ID of the subscription. The ID is automatically assigned by the system and cannot be changed.

order.formattedSubscription.id

Subscription interval

Interval of the subscription as determined in the Setup » Orders » Subscription menu. The interval determines the regularly recurrent times at which the items are sent to the customers.
Possible values: 1 month, 3 months, 6 months, 12 months.

order.formattedSubscription.interval

End date of the subscription

Date when the subscription ends.

order.formattedSubscription.endDate

Subscription total amount

order.formattedSubscription.totalAmount

Start date of the subscription

Date when the subscription starts.

order.formattedSubscription.startDate

2.1.2. Order / General

Table 2. Variables in the Order / General sub-category
Name of the variable Explanation Twig expression

Order ID

order.id

Order responsible

Returns the owner saved in the order.

order.formattedGeneral.ownerName

Order status

Name of the order status as it is saved in the Setup » Orders » Order status menu.

order.statusName

Order tags

Returns the tags that are assigned to the order.

order.formattedGeneral.orderTags | raw

Order type

Name of the order type, e.g. Order, Credit note and Repair order.
Note: To see the entire list of the order types and their IDs, refer to this page of the manual.

order.formattedGeneral.orderTypeName

ID of the order type

ID of the order type, e.g. 1 for order, 4 for credit note and 6 for repair order.
Note: To see the entire list of the order types and their IDs, refer to this page of the manual.

order.typeId

Barcode ID

order.formattedGeneral.barcodeOrderID

Parent order ID

ID of the direct preceding order
Example: In case of a credit note, this could be the ID of the return or of the order from which the credit note was generated.

order.formattedOriginOrder.referenceOrderId

External order ID

order.formattedProperties.externalOrderId

Coupon value

Value of the coupon.

order.formattedGeneral.couponValue

Main order ID

ID of the highest preceding order. Usually, this is a normal order.
Example: In case of a credit note C1 coming from a return R1 from the order O1, the Parent Order ID returns the ID of R1 and $OriginOrderID returns the ID of O1.

order.formattedOriginOrder.originOrderId

Referrer

Name of the order referrer as it is saved in the Setup » Orders » Referrers menu.

order.formattedReferrer.name

Referrer ID

ID of the order referrer as it is saved in the Setup » Orders » Referrers menu.

order.formattedReferrer.id

Is guest

Indicates whether the order is a guest order.

order.formattedGeneral.isGuest

Contact ID

order.formattedGeneral.contactId

Customer wish

During the checkout via the online shop, the contact can enter a wish regarding the items they ordered. This wish is saved as order note in the order data.

order.formattedComments.customerSpecialWishes

Flag

Returns the flag that was selected in the order.

order.formattedProperties.flag

Plenty ID

The ID is automatically assigned by the system and cannot be changed. You can find the ID in the Setup » Client » [Select client] » Settings menu.

order.plentyId

Latest availability

order.formattedGeneral.maximumAvailabilityName

Status ID

ID of the order status as it is saved in the Setup » Orders » Order status menu.

order.statusId

Seller account

order.formattedProperties.sellerAccount

Order access key

This is the hash to uniquely identify the order.

order.access_key

2.1.3. Order / Order date

Table 3. Variables in the Order / Order date sub-category
Name of the variable Explanation Twig expression

Date at which the order was received

Date of the incoming order as saved in the order.

order.formattedDates.createdOn

Date and time of incoming order

Date and time of the incoming order as saved in the order.

order.formattedDates.createdOnDateAndTime

Date and time of the outgoing items

Date and time of the outgoing items as saved in the order.

order.formattedDates.outgoingItemsBookedOnDateTime

Invoice date

order.formattedDocuments.invoiceDate

Outgoing items booked on

Date and time of the outgoing items as saved in the order.

order.formattedDates.outgoingItemsBookedOn

Paid on

Date and time of the incoming payment as saved in the order.

order.formattedDates.paidOn

2.1.4. Order / Order notes

Table 4. Variables in the Order / Order notes sub-category
Name of the variable Explanation Twig expression

Last Order note

Returns the newest note of the order.

order.lastOrderNote | raw

Order note history

Returns all order notes of the order. Individual order notes are separated by a dividing line.

order.orderNoteHistory | raw

2.1.5. Order / Order items (item list widget only)

Click on one of the following links to be forwarded directly to the corresponding sub-chapter:

2.1.5.1. Order / Order items (item list widget only) / General
Table 5. Variables in the Order / Order items (item list widget only) / General sub-category
Name of the variable Explanation Twig expression

ItemID

ID of the item. A consecutive ID is automatically assigned by the system and cannot be changed.

orderItem.variation.itemId

Item properties

orderItem.formattedProperties.all

Item amount

orderItem.quantity

Item name

Name of the item.

orderItem.orderItemName

Item number

orderItem.variation.item.ArtNo

Item type

Returns the item types as saved in the item (Item » Edit item menu) in the Global tab.
Mögliche Werte: Stocked item, Production item, Colli, Special order item.

orderItem.formattedStockType

Attribute names

Attribute names as they are saved in the Setup » Item » Attributes menu.

orderItem.attributeNames

Attribute values

Attribute values as they are saved in the Setup » Item » Attributes menu.

orderItem.attributeValues

Order item type

orderItem.typeName

Order item type ID

orderItem.typeId

Order properties

orderItem.formattedOrderCharacteristics.all | raw

Gross price

Gross price of the item.

orderItem.formattedAmounts.grossPrice

Codes of a coupon

orderItem.formattedVoucherCodes

Unit

orderItem.formattedUnit.unitName

Release date

orderItem.variation.releasedAt

External item ID

orderItem.variation.item.external_article_id

External token ID

orderItem.formattedExternalTokenId

External variation ID

orderItem.variation.externalId

Total price (unit price x quantity)

orderItem.formattedAmounts.totalPrice

Unit price

orderItem.formattedUnit.unitPrice

Referrer

orderItem.formattedReferrer.referrerName

Manufacturer name

Name of the manufacturer.

orderItem.variation.item.producer

Content

orderItem.formattedUnit.unitContent

Warehouse ID

ID of the warehouse as it is saved in the Setup » Stock » Warehouse menu.

orderItem.warehouseId

Warehouse name

Name of the warehouse as it is saved in the Setup » Stock » Warehouse menu.

orderItem.warehouseName

VAT rate

orderItem.vatRate

Model

Model name of the item

orderItem.variation.model

Net price

Net price of the item.

orderItem.formattedAmounts.netPrice

Discount per order item

orderItem.formattedAmounts.discount

Return reason

Name of the return reason as it is saved in the Setup » Orders » Order types » Returns menu.

orderItem.formattedReturn.reasonLabel

Return reason ID

ID of the return reason as it is saved in the Setup » Orders » Order types » Returns menu.

orderItem.formattedReturn.reasonId

Return comment

orderItem.formattedReturn.comment

Serial numbers

Returns all serial numbers separated by comma when these are assigned to the item.

orderItem.formattedSerialNumbers

Status of the returned item

Name of the status of the returned item.

orderItem.formattedReturn.statusLabel

Status ID of the returned item

ID of the status of the returned item.

orderItem.formattedReturn.statusId

URL to the item

Returns the URL to the item in the online shop.

orderItem.formattedLinkNew | raw

Variation ID

orderItem.variation.id

Variation name

orderItem.variation.name

Variation number

orderItem.variation.number

Order property value

orderItem.formattedOrderProperty.value | raw

Value of the return in percent

orderItem.formattedReturn.percentage

Customs tariff number

orderItem.variation.customsTariffNumber

2.1.5.2. Order / Order items (item list widget only) / Barcodes
Table 6. Variables in the Order / Order items (item list widget only) / Barcodes sub-category
Name of the variable Explanation Twig expression

ASIN

Amazon Standard Ident Number (ASIN) of the item

orderItem.formattedBarcodes.ASIN

GTIN

Global Trade Item Number (GTIN) of the item

orderItem.formattedBarcodes.GTIN

GTIN image

Returns the barcode based on the GTIN code of the item. The barcode is returned as an image. GTIN = Global Trade Item Number.

orderItem.formattedBarcodes.GTINImage

ISBN

ISBN code of the item

orderItem.formattedBarcodes.ISBN

2.1.5.3. Order / Order items (item list widget only) / Images
Table 7. Variables in the Order / Order items (item list widget only) / Images sub-category
Name of the variable Explanation Twig expression

Variation image URL (second preview size)

Returns the URL to the variation image in second preview size.

orderItem.formattedImageUrlSize.secondPreview

Item image URL (medium size)

Returns the URL to the variation image in medium size.

orderItem.formattedImageUrlSize.middle

Variation image URL (full size)

Returns the URL to the variation image in full size.

orderItem.formattedImageUrl

Variation image URL (full size)

Returns the URL to the variation image in preview size.

orderItem.formattedImageUrlSize.preview

2.1.5.4. Order / Order items (item list widget only) / Item Properties

In this EmailBuilder section, all variables for which you have created properties of the Item section in the Setup » Settings » Properties menu are displayed in this section.
For further information, refer to the Properties page.

2.1.5.5. Order / Order items (item list widget only) / Order Item Properties

In this EmailBuilder section, all variables for which you have created order item properties are displayed. You can find the value and name of the order item property as separate variables.
For further information, refer to the Working with orders page.

2.1.5.6. Order / Order items (item list widget only) / Free text fields
Table 8. Variables in the Order / Order items (item list widget only) / Free text fields sub-category
Name of the variable Explanation Twig expression

Free text field 1

Free text fields for the items as they are saved in the Setup » Item » Free text fields menu.
Example: Free text field 3 displays the text that is saved in Field 3.

orderItem.variation.item.free1

Free text field 2

orderItem.variation.item.free2

Free text field 3

orderItem.variation.item.free3

Free text field 4

orderItem.variation.item.free4

Free text field 5

orderItem.variation.item.free5

Free text field 6

orderItem.variation.item.free6

Free text field 7

orderItem.variation.item.free7

Free text field 8

orderItem.variation.item.free8

Free text field 9

orderItem.variation.item.free9

Free text field 10

orderItem.variation.item.free10

Free text field 11

orderItem.variation.item.free11

Free text field 12

orderItem.variation.item.free12

Free text field 13

orderItem.variation.item.free13

Free text field 14

orderItem.variation.item.free14

Free text field 15

orderItem.variation.item.free15

Free text field 16

orderItem.variation.item.free16

Free text field 17

orderItem.variation.item.free17

Free text field 18

orderItem.variation.item.free18

Free text field 19

orderItem.variation.item.free19

Free text field 20

orderItem.variation.item.free20

2.1.5.7. Order / Order items (item list widget only) / Suppliers
Table 9. Variables in the Order / Order items (item list widget only) / Suppliers sub-category
Name of the variable Explanation Twig expression

Last price query

orderItem.formattedSupplierData.supplierLastPriceQuery

Supplier item description

orderItem.formattedSupplierData.supplierItemDescription

Supplier item number

orderItem.formattedSupplierData.supplierItemNumber

Supplier company

Returns the name of the company that is linked with the supplier.

orderItem.formattedSupplierData.supplier

Delivery time in days

orderItem.formattedSupplierData.supplierDeliveryTimeDays

Minimum purchase

orderItem.formattedSupplierData.supplierMinimumPurchase

Price in order currency

orderItem.formattedSupplierData.supplierPurchasePriceOrderCurrency

Price in system currency

orderItem.formattedSupplierData.supplierPurchasePriceSystemCurrency

Discount in percent

orderItem.formattedSupplierData.supplierDiscount

Discountable

orderItem.formattedSupplierData.supplierIsDiscountable

Symbol of order curreny

orderItem.formattedSupplierData.supplierPurchasePriceOrderCurrencySymbol

Symbol of system currency

orderItem.formattedSupplierData.supplierPurchasePriceSystemCurrencySymbol

Units contained

orderItem.formattedSupplierData.supplierPackagingUnit

First name and last name of supplier

Returns the first and last name of the contact that is linked with the supplier.

orderItem.formattedSupplierData.supplierName

2.1.5.8. Order / Order items (item list widget only) / Availabilities
Important: Usage of variables regarding stock availability

Note the following explanation about the usage of variables regarding stock availability:

The variable must not be used if the stock falls below a value that leads to a change in the delivery time. The variable takes into account the value after the order was placed and not at the moment the order is triggered in the shopping cart.

This statement applies to the following variables:

  • Availability ID

  • Availability ID physical stock

  • Availability text

  • Availability text physical stock

Table 10. Variables in the Order / Order items (item list widget only) / Availabilities sub-category
Name of the variable Explanation Twig expression

Availability ID

ID of the item availability of the net stock as it is saved in the Setup » Item » Availability menu. A consecutive ID is automatically assigned by the system and cannot be changed.
Important: Note the explanations in the box Usage of variables regarding stock availability above this table.

orderItem.formattedAvailability.availabilityId

Availability ID physical stock

ID of the item availability of the physical stock
Important: Note the explanations in the box Usage of variables regarding stock availability above this table.

orderItem.formattedAvailability.availabilityPhysicalStockId

Availability text

Name of the item availability of the net stock
Important: Note the explanations in the box Usage of variables regarding stock availability above this table.

orderItem.formattedAvailability.availabilityName

Availability text physical stock

Name of the item availability of the physical stock
Important: Note the explanations in the box Usage of variables regarding stock availability above this table.

orderItem.formattedAvailability.availabilityPhysicalStockName

2.1.6. Order / Bank details of the order

Table 11. Variables in the sub-category Order / Bank details of the order
Name of the variable Explanation Twig expression

Bank code

Bank code as saved in the Bank details section of the order.

order.formattedBankData.bankCode

Bank name

Name of the bank as saved in the Bank details section of the order.

order.formattedBankData.bankName

BIC

BIC as saved in the Bank details section of the order.

order.formattedBankData.bic

IBAN

IBAN of the bank as saved in the Bank details section of the order.

order.formattedBankData.iban

Account holder

Name of the account holder as saved in the Bank details section of the order.

order.formattedBankData.accountHolder

Account number

Account number as saved in the Bank details section of the order.

order.formattedBankData.accountNumber

Country of the bank

Country of the bank as saved in the Bank details section of the order.

order.formattedBankData.bankCountry

Postcode and town of the bank

Postcode and town of the bank as saved in the Bank details section of the order.

order.formattedBankData.bankPostalCodeTown

SEPA type of mandate

SEPA type as saved in the Bank details section of the order.

order.formattedBankData.SEPADirectDebitMethod

SEPA payment frequency

SEPA payment frequency as saved in the Bank details section of the order.

order.formattedBankData.SEPAFrequency

SEPA direct debit mandate

SEPA direct debit mandate as saved in the Bank details section of the order.

order.formattedBankData.SEPA

SEPA direct debit mandate granted on

Date when the SEPA direct debit mandate was granted. Is saved in the Bank details section of the order.

order.formattedBankData.SEPADate

SEPA type

SEPA type as saved in the Bank details section of the order.

order.formattedBankData.SEPADirectDebitType

Street of the bank

Street of the bank as saved in the Bank details section of the order.

order.formattedBankData.bankStreet

2.1.7. Order / Order properties

In this section of the EmailBuilder, all variables of all order-related properties are shown.

2.1.8. Order / Item Properties

In this section of the EmailBuilder, all variables of all order-related item properties are shown.

2.1.9. Order / Delivery address

Click on one of the following links to be forwarded directly to the corresponding sub-chapter:

2.1.9.1. Order / Delivery address / Delivery address data
Table 12. Variables in the Order / Delivery address / Delivery address data sub-category
Name of the variable Twig expression

Delivery address Additional address information

order.formattedAddresses.deliveryAddress.address3

Delivery address State

order.formattedAddresses.deliveryAddress.state.name

Delivery address Company name

order.formattedAddresses.deliveryAddress.name1

Delivery address House number

order.formattedAddresses.deliveryAddress.address2

Delivery address Country

order.formattedAddresses.deliveryAddress.country.name

Delivery address Country ID

order.formattedAddresses.deliveryAddress.country.id

Delivery address Country ISO code 2

order.formattedAddresses.deliveryAddress.country.isoCode2

Delivery address Country ISO code 3

order.formattedAddresses.deliveryAddress.country.isoCode3

Delivery address Last name

order.formattedAddresses.deliveryAddress.name3

Delivery address Town

order.formattedAddresses.deliveryAddress.town

Delivery address Postcode

order.formattedAddresses.deliveryAddress.postalCode

Delivery address Postcode and town

order.formattedAddresses.deliveryAddress.postalCode ~ ' ' ~ order.formattedAddresses.deliveryAddress.town

Delivery address Post number

order.formattedAddresses.deliveryAddress.formattedOptions.postNumber

Delivery address Street

order.formattedAddresses.deliveryAddress.address1

Delivery address First name

order.formattedAddresses.deliveryAddress.name2

Delivery address First name and last name

order.formattedAddresses.deliveryAddress.name2 ~ ' ' ~ order.formattedAddresses.deliveryAddress.name3

2.1.9.2. Order / Delivery address / Delivery address options
Table 13. Variables in the Order / Delivery address / Delivery address options sub-category
Name of the variable Explanation Twig expression

Delivery address Age rating

Age rating from the delivery address as saved in the order.

order.formattedAddresses.deliveryAddress.formattedOptions.BBFC

Delivery address Email

Email address from the delivery address as saved in the order.

order.formattedAddresses.deliveryAddress.formattedOptions.email

Delivery address External address ID

External address ID from the delivery address as saved in the order.

order.formattedAddresses.deliveryAddress.formattedOptions.externalAddressID

Delivery address External customer ID

External customer ID from the delivery address as saved in the order.

order.formattedAddresses.deliveryAddress.formattedOptions.externalCustomerID

Delivery address Birthday

Birthday from the delivery address as saved in the order.

order.formattedAddresses.deliveryAddress.formattedOptions.birthday

Delivery address Entry certificate

Entry certificate from the delivery address as saved in the order.

order.formattedAddresses.deliveryAddress.formattedOptions.entryCertificate

Delivery address Contact person

Contact person from the delivery address as saved in the order.

order.formattedAddresses.deliveryAddress.formattedOptions.contactPerson

Delivery address Personal number

Personal number from the delivery address as saved in the order.

order.formattedAddresses.deliveryAddress.formattedOptions.personalId

Delivery address Telephone

Phone number from the delivery address as saved in the order.

order.formattedAddresses.deliveryAddress.formattedOptions.telephone

Delivery address Title

Title from the delivery address as saved in the order.

order.formattedAddresses.deliveryAddress.formattedOptions.title

Delivery address VAT number

VAT number from the delivery address as saved in the order.

order.formattedAddresses.deliveryAddress.formattedOptions.VATNumber

2.1.10. Order / Suppliers

Table 14. Variables in the Order / Suppliers sub-category
Name of the variable Explanation Twig expression

Order warehouse ID

order.formattedProperties.warehouse

Order warehouse name

order.formattedProperties.warehouseName

Reorder ID

ID of the reorder.

order.formattedReorder.id

2.1.11. Order / Invoice address

Click on one of the following links to be forwarded directly to the corresponding sub-chapter:

2.1.11.1. Order / Invoice address / Invoice address data
Table 15. Variables in the Order / Invoice address / Invoice address data sub-category
Name of the variable Twig expression

Invoice address Additional address information

order.formattedAddresses.invoiceAddress.address3

Invoice address State

order.formattedAddresses.invoiceAddress.state.name

Invoice address Company name

order.formattedAddresses.invoiceAddress.name1

Invoice address House number

order.formattedAddresses.invoiceAddress.address2

Invoice address Country

order.formattedAddresses.invoiceAddress.country.name

Invoice address Country ID

order.formattedAddresses.invoiceAddress.country.id

Invoice address Country ISO code 2

order.formattedAddresses.invoiceAddress.country.isoCode2

Invoice address Country ISO code 3

order.formattedAddresses.invoiceAddress.country.isoCode3

Invoice address Last name

order.formattedAddresses.invoiceAddress.name3

Invoice address Town

order.formattedAddresses.invoiceAddress.town

Invoice address Postcode

order.formattedAddresses.invoiceAddress.postalCode

Invoice address Postcode and town

order.formattedAddresses.invoiceAddress.postalCode ~ ' ' ~ order.formattedAddresses.invoiceAddress.town

Invoice address Street

order.formattedAddresses.invoiceAddress.address1

Invoice address First name

order.formattedAddresses.invoiceAddress.name2

Invoice address First name and last name

order.formattedAddresses.invoiceAddress.name2 ~ ' ' ~ order.formattedAddresses.invoiceAddress.name3

2.1.11.2. Order / Invoice address / Invoice address options
Table 16. Variables in the Order / Invoice address / Invoice address options sub-category
Name of the variable Explanation Twig expression

Invoice address Age rating

Age rating from the invoice address as saved in the order.

order.formattedAddresses.invoiceAddress.formattedOptions.BBFC

Invoice address Email

Email address from the invoice address as saved in the order.

order.formattedAddresses.invoiceAddress.formattedOptions.email

Invoice address External address ID

External address ID from the invoice address as saved in the order.

order.formattedAddresses.invoiceAddress.formattedOptions.externalAddressID

Invoice address External customer ID

External customer ID from the invoice address as saved in the order.

order.formattedAddresses.invoiceAddress.formattedOptions.externalCustomerID

Invoice address Birthday

Birthday from the invoice address as saved in the order.

order.formattedAddresses.invoiceAddress.formattedOptions.birthday

Invoice address Entry certificate

Entry certificate from the invoice address as saved in the order.

order.formattedAddresses.invoiceAddress.formattedOptions.entryCertificate

Invoice address Contact person

Contact person from the invoice address as saved in the order.

order.formattedAddresses.invoiceAddress.formattedOptions.contactPerson

Invoice address Personal number

Personal number from the invoice address as saved in the order.

order.formattedAddresses.invoiceAddress.formattedOptions.personalId

Invoice address Post number

Post number from the invoice address as saved in the order.

order.formattedAddresses.invoiceAddress.formattedOptions.postNumber

Invoice address Telephone

Phone number from the invoice address as saved in the order.

order.formattedAddresses.invoiceAddress.formattedOptions.telephone

Invoice address Title

Title from the invoice address as saved in the order.

order.formattedAddresses.invoiceAddress.formattedOptions.title

Invoice address VAT number

VAT number from the invoice address as saved in the order.

order.formattedAddresses.invoiceAddress.formattedOptions.VATNumber

2.1.12. Order / Invoice data

Table 17. Variables in the Order / Invoice data sub-category
Name of the variable Explanation Twig expression

Item value

order.formattedGeneral.valueOfItems

Gift card total

order.formattedGeneral.giftCardAmount

Amount paid

order.formattedGeneral.paidAmount

VAT total

order.formattedGeneral.totalVat

Net total order

order.formattedGeneral.totalNet

Discount total amount gross

order.formattedSubtotals.totalDiscountGross

Discount total amount net

order.formattedSubtotals.totalDiscountNet

Total invoice amount

order.formattedGeneral.invoiceTotalIncludingGiftCard

Invoice amount minus gift card

order.formattedGeneral.invoiceTotal

Total invoice amount, net

order.formattedGeneral.invoiceTotalNet

Giro code in order currency

Returns the Giro code in the order currency. Your customers can then scan the Giro code directly with their banking app and pay the bill.

order.formattedGeneral.giroCodeInOrderCurrency | raw

Giro code in system currency

Returns the Giro code in the system currency. Your customers can then scan the Giro code directly with their banking app and pay the bill.

order.formattedGeneral.giroCodeInSystemCurrency | raw

Reorder cancelled amount

Returns the total value of items that were cancelled and not delivered as part of a reorder.

order.formattedReorder.cancelledItemsAmount

Open amount

order.formattedGeneral.openAmount

Invoice number ID

order.formattedDocuments.invoice

Value of items (gross)

order.formattedSubtotals.subtotalPriceGross

Value of items (net)

order.formattedSubtotals.subtotalPriceNet

Currency code

Currency code, e.g. EUR or USD.

order.formattedSubtotals.currencyCode

Currency symbol

Currency symbol, e.g. or $.

order.formattedSubtotals.currencySymbol

Overpaid amount

order.formattedGeneral.overpaidAmount

2.1.13. Order / Shipping

Table 18. Variables in the Order / Shipping sub-category
Name of the variable Explanation Twig expression

Number of packages

Shows the number of packages contained in the order.

order.package

DHL Retoure Online QR code image

Sends your customers a QR code for DHL Retoure Online. The QR code is shown as an image in the email of your customers.
If your customers want to send back an item, they have to show the QR code on their smartphone to one of the employees in the post office and they will print the return label and attach it to the parcel. Thus, your customers do no longer need a printer at home and you do no longer have to send the return label attached as PDF.

order.formattedGeneral.DHLRetoureOnlineQRCodeImage | raw

DHL Retoure Online QR code URL

Sends your customers a QR code for DHL Retoure Online. The QR code is shown as an URL in the email of your customers. After clicking on the URL, the QR code appears in a separate window.
If your customers want to send back an item, they have to show the QR code on their smartphone to one of the employees in the post office and they will print the return label and attach it to the parcel. Thus, your customers do no longer need a printer at home and you do no longer have to send the return label attached as PDF.

order.formattedGeneral.DHLRetoureOnlineQRCodeURLNew | raw

GLS ShipIT QR code image

Sends your customers a QR code for GLS ShipIT. The QR code is shown as an image in the email of your customers. If your customers want to send back an item, they have to show the QR code on their smartphone to one of the employees in the GLS ParcelShop and they will print the return label and attach it to the parcel. Thus, your customers do no longer need a printer at home and you do no longer have to send the return label attached as PDF.

order.formattedGeneral.GLSQRCodeImage | raw

GLS ShipIT Online QR-Code URL

Sends your customers a QR code for GLS ShipIT. The QR code is shown as an URL in the email of your customers. After clicking on the URL, the QR code appears in a separate window. If your customers want to send back an item, they have to show the QR code on their smartphone to one of the employees in the GLS ParcelShop and they will print the return label and attach it to the parcel. Thus, your customers do no longer need a printer at home and you do no longer have to send the return label attached as PDF.

order.formattedGeneral.GLSQRCodeURL | raw

Delivery note ID

Returns the ID of the delivery note.

order.formattedDocuments.deliveryNote

Possible delivery date

order.formattedDates.earliestDeliveryDate

Redistribution Delivery date

order.formattedDates.estimatedDeliveryDate

Reorder Delivery date

order.formattedReorder.estimatedDeliveryDate

Package weight

Package weight and unit as saved in the Orders » Shipping centre menu in the Shipping packages section.

order.formattedShipping.packageWeight

Package number list

Package numbers/tracking numbers are saved at the order after the order was successfully registered with the shipping service provider.

order.formattedShipping.packageNumberList

Return date

order.formattedDates.returnDate

Return package number

order.returns_code

Tracking URL

Returns the link to the website of the shipping service provider that is used to track the shipment. The tracking URL of the shipping service provider is saved in the Setup » Orders » Shipping » Settings menu in the Shipping service provider tab.
Note: Have a look at our practical example about this topic. Learn which settings you need to carry out to the send the tracking URL to your customers.

order.formattedShipping.trackingURL | striptags

Shipping service provider

Name of the shipping service provider as it is saved in the Setup » Orders » Shipping » Settings menu in the Shipping service provider tab.

order.formattedShipping.providerName

Shipping service provider ID

Is automatically saved by the system. You can find the ID of the shipping service provider in the Setup » Orders » Shipping » Settings menu in the Shipping service provider tab.

order.formattedShipping.providerId

Shipping costs (gross)

order.formattedSubtotals.shippingCostsGross

Shipping costs (net)

order.formattedSubtotals.shippingCostsNet

Shipping profile

Name of the shipping profile as it is saved in the Setup » Orders » Shipping » Settings menu in the Shipping profiles tab.

order.formattedShipping.profileName

Shipping profile ID

Is automatically saved by the system. You can find the ID of the shipping profile in the Setup » Orders » Shipping » Settings menu in the Shipping profiles tab.

order.formattedShipping.profileId

Estimated delivery date

order.formattedDates.estimatedDeliveryDate

Estimated shipping date

order.formattedDates.estimatedShippingDate

2.1.14. Order / Payment

Table 19. Variables in the Order / Shipping sub-category
Name of the variable Explanation Twig expression

eBay payment ID

order.formattedProperties.ebayUniquePaymentID

Link to PayPal payment page

Returns the link to the PayPal payment page.

order.formattedGeneral.paypalVariables.link | raw

Button to PayPal payment page

Returns the image with an integrated link to the PayPal payment page.

order.formattedGeneral.paypalVariables.linkButton | raw

Transaction ID

ID of the payment transaction.

order.formattedGeneral.paymentTransactionId

Payment method (back end)

order.formattedGeneral.methodOfPaymentName

Payment method (front end)

order.formattedGeneral.methodOfPaymentNameFrontend

Payment method ID

The ID is automatically assigned by the system. The IDs of the payment methods are listed in the Setup » Orders » Payment » Payment methods menu.

order.formattedProperties.paymentMethod

Payment due date

order.formattedDates.paymentDueDate

2.2. Variables: Global

In this category, you can find all global sub-categories.

Click on one of the following links to be forwarded directly to the corresponding sub-chapter:

2.2.1. Global / General

Table 20. Variables in the Global variables / General sub-category
Name of the variable Explanation Twig expression

Email sender

Returns the sender of the email.

globals.emailSender

EORI number

Unique identification number that is required for customs-related procedures.

globals.account.EORINumber

Today’s date

Returns today’s date in the format dd-mm-yyyy.

"now"|date("d-m-Y")

Client ID

Returns the ID of the client (shop).

globals.webshopId

Client name

Shows the name of the client (shop).

globals.clientName

Name of the logged in user

Returns the first and last name of the logged in user.

globals.account.loggedUserRealname | raw

Signature of the logged in user (HTML)

Returns the signature of the currently logged in user in html-format. To save the signature, go to Setup » Account management » Accounts.

globals.account.loggedUserSignatureHTML

Signature of the logged in user (plain text)

Returns the signature of the currently logged in user. To save the signature, go to Setup » Account management » Accounts.

globals.account.loggedUserSignatureText

Signature of the client (HTML)

To save the signature of the client, go to the section Signature in the Email accounts menu. You can find the section in the Setup » Client » Global » Email accounts menu.

globals.account.signatureHTML | raw

Signature of the client (plain text)

To save the signature of the client, go to the section Signature in the Email accounts menu. You can find the section in the Setup » Client » Global » Email accounts menu.

globals.account.signatureText | raw

2.2.2. Global / Bank details of the client

Table 21. Variables in the Global variables / Bank details of the client sub-category
Name of the variable Explanation Twig expression

Bank name (master data)

Bank name from the master data of your system. Is saved in the Setup » Settings » Bank menu.

globals.bank.name

BIC (master data)

BIC from the master data of your system. Is saved in the Setup » Settings » Bank menu.

globals.bank.bic

IBAN (master data)

IBAN from the master data of your system. Is saved in the Setup » Settings » Bank menu.

globals.bank.iban

Account holder (master data)

Account holder from the master data of your system. Is saved in the Setup » Settings » Bank menu.

globals.bank.owner

2.2.3. Global / Coupons

Table 22. Variables in the Global variables / Coupons sub-category
Name of the variable Explanation Twig expression

Coupon code (1)

Coupon codes are generated in the campaign in the Orders » Coupons menu. A coupon code can always be assigned to only one campaign to send this coupon code from the campaign in an email template.
Note: The coupon code variables can only be used for coupons of the variety Promotional coupons.

globals.coupons.couponCode1

Coupon code (2)

globals.coupons.couponCode2

Coupon code (3)

globals.coupons.couponCode3

Coupon code (4)

globals.coupons.couponCode4

Coupon code (5)

globals.coupons.couponCode5

Coupon code (6)

globals.coupons.couponCode6

Coupon code (7)

globals.coupons.couponCode7

Coupon code (8)

globals.coupons.couponCode8

Coupon code (9)

globals.coupons.couponCode9

Coupon code (10)

globals.coupons.couponCode10

Your legal texts are not displayed correctly in sent emails?

If your legal texts that you inserted in the code widget as twig expressions are not displayed correctly in sent emails, solve this problem by adding `\| raw ` to the end of the twig expression.

2.3. Variables: Contact

In this category, you can find all contact-relevant sub-categories.

Click on one of the following links to be forwarded directly to the corresponding sub-chapter:

2.3.1. Contact / General

Table 25. Variables in the Contact / General sub-category
Name of the variable Explanation Twig expression

Form of address

contact.formattedSalutation.label

Salutation business

contact.formattedOptions.salutationWork

Salutation private

contact.formattedOptions.salutationPrivate

Order quantity

contact.formattedOrdersCount

External ID

Returns the external number saved in the contact details.

contact.externalId

Company name

Name of the company.

contact.formattedAccounts.companyName

Gender

If gender is male, male is shown.
If gender is female, female is shown.
If gender is diverse, an empty option is shown.

contact.gender is same as ('diverse') ? '' : contact.gender

Class

Class that is assigned to the contact. Classes are created in the Setup » CRM » Classes menu.

contact.formattedClass.name

Contact ID

ID of the contact. A consecutive ID is automatically assigned by the system and cannot be changed.

contact.id

Customer sign

order.formattedProperties.customerSign

Last name

contact.lastName

Newsletter: Confirmation by contact

Date when the contact has confirmed the newsletter receipt.
Date format in the email: mm-dd-yyyy.
In the contact data record, the timestamp in the format 00:00:00 is also saved in addition to the date in the format dd-mm-yyyy.

contact.newsletterAllowanceAt

Number

Additional number for the contact.

contact.number

Signature of contact owner (plain text)

First name and last name of the system user who is saved as owner in the contact data record.

contact.formattedUser.signatureNoHtml

Signature of contact owner (HTML)

First name and last name of the system user who is saved as owner in the contact data record, in HTML format.

contact.formattedUser.signatureHtml

Language

Language as saved in the contact data record. If you created an email template in the selected language, the email templates are sent to the contact in this language.

contact.lang

Title

contact.title

Full name

contact.fullName

First name

contact.firstName

First and last name of the system user

First name and last name of the system user who is saved as owner in the contact data record.

contact.formattedUser.realName

2.3.2. Contact / Bank details of the contact

Table 26. Variables in the Order / Bank details of the contact sub-category
Name of the variable Explanation Twig expression

Bank name of the contact

Bank name as saved in the contact data record.

contact.formattedBanks.bankName

BIC of the contact

BIC as saved in the contact data record.

contact.formattedBanks.bic

IBAN of the contact

IBAN as saved in the contact data record.

contact.formattedBanks.iban

Account holder (contact)

Account owner as saved in the contact data record.

contact.formattedBanks.accountOwner

2.3.3. Contact / Properties

In this EmailBuilder section, all variables for which you have created properties of the Contact section in the Setup » Settings » Properties menu are displayed in this section.
For further information, refer to the Properties page.

2.3.4. Contact / Contact options

Table 27. Variables in the Contact / Contact options sub-category
Name of the variable Twig expression

Email business

contact.formattedOptions.emailWork

PayPal email address

contact.formattedOptions.emailPayPal

Email private

contact.formattedOptions.emailPrivate

eBay name

contact.formattedOptions.marketplaceEbay

Fax business

contact.formattedOptions.telefaxWork

Fax private

contact.formattedOptions.telefaxPrivate

Mobile business

contact.formattedOptions.telephoneMobileWork

Mobile private

contact.formattedOptions.telephoneMobilePrivate

Phone business

contact.formattedOptions.telephoneWork

Phone private

contact.formattedOptions.telephonePrivate

Additional contact person

contact.formattedOptions.additionalContactPerson

2.3.5. Contact / Delivery address

Click on one of the following links to be forwarded directly to the corresponding sub-chapter:

2.3.5.1. Contact / Delivery address / Delivery address data
Table 28. Variables in the Contact / Delivery address / Delivery address data sub-category
Name of the variable Twig expression

Delivery address Additional address information

contact.formattedAddresses.deliveryAddress.address3 ~ ' ' ~ contact.formattedAddresses.deliveryAddress.address4

Delivery address State

contact.formattedAddresses.deliveryAddress.state.name

Delivery address Company name

contact.formattedAddresses.deliveryAddress.name1

Delivery address House number

contact.formattedAddresses.deliveryAddress.address2

Delivery address Country

contact.formattedAddresses.deliveryAddress.country.name

Delivery address Country ID

contact.formattedAddresses.deliveryAddress.country.id

Delivery address Country ISO code 2

contact.formattedAddresses.deliveryAddress.country.isoCode2

Delivery address Country ISO code 3

contact.formattedAddresses.deliveryAddress.country.isoCode3

Delivery address Last name

contact.formattedAddresses.deliveryAddress.name3

Delivery address Town

contact.formattedAddresses.deliveryAddress.town

Delivery address Postcode

contact.formattedAddresses.deliveryAddress.postalCode

Delivery address Postcode and town

contact.formattedAddresses.deliveryAddress.postalCode ~ ' ' ~ contact.formattedAddresses.deliveryAddress.town

Delivery address Street

contact.formattedAddresses.deliveryAddress.address1 ~ ' ' ~ contact.formattedAddresses.deliveryAddress.address2

Delivery address First name

contact.formattedAddresses.deliveryAddress.name2

Delivery address First name and last name

contact.formattedAddresses.deliveryAddress.name2 ~ ' ' ~ contact.formattedAddresses.deliveryAddress.name3

2.3.5.2. Contact / Delivery address / Delivery address options
Note: If it’s a reorder, some of the following variables for the address options in the delivery address are not shown in the email to your customers. This is because the addresses that are saved for a supplier are not taken into account because you can save suppliers without an address in your system.
Table 29. Variables in the Contact / Delivery address / Delivery address options sub-category
Name of the variable Explanation Twig expression

Delivery address Age rating

Age rating from the delivery address as saved in the Address > Address options section of the contact data record.

contact.formattedAddresses.deliveryAddress.formattedOptions.BBFC

Delivery address Email

Email address from the delivery address as saved in the Address / Address options section of the contact data record.

contact.formattedAddresses.deliveryAddress.formattedOptions.email

Delivery address External address ID

External address ID from the delivery address as saved in the Address / Address options section of the contact data record.

contact.formattedAddresses.deliveryAddress.formattedOptions.externalAddressID

Delivery address External customer ID

External customer ID from the delivery address as saved in the Address / Address options section of the contact data record.

contact.formattedAddresses.deliveryAddress.formattedOptions.externalCustomerID

Delivery address Birthday

Birthday from the delivery address as saved in the Address / Address options section of the contact data record.

contact.formattedAddresses.deliveryAddress.formattedOptions.birthday

Delivery address Entry certificate

Entry certificate from the delivery address as saved in the Address / Address options section of the contact data record.

contact.formattedAddresses.deliveryAddress.formattedOptions.entryCertificate

Delivery address Contact person

Contact person from the delivery address as saved in the Address / Address options section of the contact data record.

contact.formattedAddresses.deliveryAddress.formattedOptions.contactPerson

Delivery address Personal number

Personal number from the delivery address as saved in the Address / Address options section of the contact data record.

contact.formattedAddresses.deliveryAddress.formattedOptions.personalId

Delivery address Post number

Post number from the delivery address as saved in the Address / Address options section of the contact data record.

contact.formattedAddresses.deliveryAddress.formattedOptions.postNumber

Delivery address Telephone

Phone number from the delivery address as saved in the Address / Address options section of the contact data record.

contact.formattedAddresses.deliveryAddress.formattedOptions.telephone

Delivery address Title

Title from the delivery address as saved in the Address / Address options section of the contact data record.

contact.formattedAddresses.deliveryAddress.formattedOptions.title

Delivery address VAT number

VAT number from the delivery address as saved in the Address / Address options section of the contact data record.

contact.formattedAddresses.deliveryAddress.formattedOptions.VATNumber

2.3.6. Contact / Invoice address

Click on one of the following links to be forwarded directly to the corresponding sub-chapter:

2.3.6.1. Contact / Invoice address / Invoice address data
Table 30. Variables in the Contact / Invoice address / Invoice address data sub-category
Name of the variable Twig expression

Invoice address Additional address information

contact.formattedAddresses.invoiceAddress.address3 ~ ' ' ~ contact.formattedAddresses.invoiceAddress.address4

Invoice address State

contact.formattedAddresses.invoiceAddress.state.name

Invoice address Company name

contact.formattedAddresses.invoiceAddress.name1

Invoice address House number

contact.formattedAddresses.invoiceAddress.address2

Invoice address Country

contact.formattedAddresses.invoiceAddress.country.name

Invoice address Country ID

contact.formattedAddresses.invoiceAddress.country.id

Invoice address Country ISO code 2

contact.formattedAddresses.invoiceAddress.country.isoCode2

Invoice address Country ISO code 3

contact.formattedAddresses.invoiceAddress.country.isoCode3

Invoice address Last name

contact.formattedAddresses.invoiceAddress.name3

Invoice address Town

contact.formattedAddresses.invoiceAddress.town

Invoice address Postcode

contact.formattedAddresses.invoiceAddress.postalCode

Invoice address Postcode and town

contact.formattedAddresses.invoiceAddress.postalCode ~ ' ' ~ contact.formattedAddresses.invoiceAddress.town

Invoice address Street

contact.formattedAddresses.invoiceAddress.address1 ~ ' ' ~ contact.formattedAddresses.invoiceAddress.address2

Invoice address First name

contact.formattedAddresses.invoiceAddress.name2

Invoice address First name and last name

contact.formattedAddresses.invoiceAddress.name2 ~ ' ' ~ contact.formattedAddresses.invoiceAddress.name3

2.3.6.2. Contact / Invoice address / Invoice address options
Note: If it’s a reorder, some of the following variables for the address options in the delivery address are not shown in the email to your customers. This is because the addresses that are saved for a supplier are not taken into account because you can save suppliers without an address in your system.
Table 31. Variables in the Contact / Invoice address / Invoice address options sub-category

Invoice address Age rating

Age rating from the invoice address as saved in the Address / Address options section of the contact data record.

contact.formattedAddresses.invoiceAddress.formattedOptions.BBFC

Invoice address Email

Email address from the invoice address as saved in the Address / Address options section of the contact data record.

contact.formattedAddresses.invoiceAddress.formattedOptions.email

Invoice address External address ID

External address ID from the invoice address as saved in the Address / Address options section of the contact data record.

contact.formattedAddresses.deliveryAddress.formattedOptions.externalAddressID

Invoice address External customer ID

External customer ID from the invoice address as saved in the Address / Address options section of the contact data record.

contact.formattedAddresses.invoiceAddress.formattedOptions.externalCustomerID

Invoice address Birthday

Birthday from the invoice address as saved in the Address / Address options section of the contact data record.

contact.formattedAddresses.invoiceAddress.formattedOptions.birthday

Invoice address Entry certificate

Entry certificate from the invoice address as saved in the Address / Address options section of the contact data record.

contact.formattedAddresses.invoiceAddress.formattedOptions.entryCertificate

Invoice address Contact person

Contact person from the invoice address as saved in the Address / Address options section of the contact data record.

contact.formattedAddresses.invoiceAddress.formattedOptions.contactPerson

Invoice address Personal number

Personal number from the invoice address as saved in the Address / Address options section of the contact data record.

contact.formattedAddresses.invoiceAddress.formattedOptions.personalId

Invoice address Post number

Post number from the invoice address as saved in the Address / Address options section of the contact data record.

contact.formattedAddresses.invoiceAddress.formattedOptions.postNumber

Invoice address Telephone

Phone number from the invoice address as saved in the Address / Address options section of the contact data record.

contact.formattedAddresses.invoiceAddress.formattedOptions.telephone

Invoice address Title

Title from the invoice address as saved in the Address / Address options section of the contact data record.

contact.formattedAddresses.invoiceAddress.formattedOptions.title

Invoice address VAT number

VAT number from the invoice address as saved in the Address / Address options section of the contact data record.

contact.formattedAddresses.deliveryAddress.formattedOptions.VATNumber

2.4. Variables: Messenger

Automatic mapping

The emails that come into your system via the Messenger are assigned according to keywords or textual parameters that are automatically recognised by your system.
For further information about the assignment, refer to the Assigning messages in the Messenger chapter on the Messenger user manual page.

Table 32. Variables in the Messenger category
Name of the variable Explanation Twig expression

First whispered message of conversation

Returns the text of the first whispered message within the conversation.

messenger.formattedMessage.conversationFirstWhisperedMessage | raw

First message of conversation

Returns the text of the first message within the conversation.

messenger.formattedMessage.conversationFirstMessage | raw

Conversation ID

Returns the ID of the conversation.

messenger.uuid

Conversation history

messenger.formattedMessage.conversationHistory | raw

Conversation short ID

Returns the short ID of the conversation.

messenger.shortId

Last whispered message of conversation

Returns the text of the last whispered message within the conversation.

messenger.formattedMessage.conversationLastWhisperedMessage | raw

Last message of conversation

Returns the text of the last message within the conversation.

messenger.formattedMessage.conversationLastMessage | raw

Title of conversation

Returns the subject of the conversation.

messenger.title

2.5. Variables: Newsletter

Table 33. Variables in the Newsletter category
Name of the variable Explanation Twig expression

Newsletter last name

Last name of the person who wants to subscribe for the newsletter.

newsletter.lastName

Newsletter first name

First name of the person who wants to subscribe for the newsletter.

newsletter.firstName

URL to unsubscribe from newsletter

Returns the URL to unsubscribe from the newsletter.

newsletter.urlToUnsubscribeFromNewsletter | raw

URL for confirming the newsletter receipt

Returns the URL to confirm the newsletter subscription.

newsletter.formattedConfirmUrlNew | raw

2.6. Variables: Text blocks

In the Text blocks section, you can find all text blocks as variables that you created in the CRM » EmailBuilder menu. You can later insert the text blocks in your Messenger messages.