Skip to main content
All CollectionsIntegrationsSalesforce Commerce CloudTransactional email
Transactional email variables for Salesforce Commerce Cloud
Transactional email variables for Salesforce Commerce Cloud

Learn which Liquid variables you can use in your customer and order transactional email templates for Salesforce Commerce Cloud.

Gareth Burroughes avatar
Written by Gareth Burroughes
Updated over a week ago

This reference document lists all the Liquid variables that are available for Salesforce Commerce Cloud transactional email campaigns.


Variable requirement

You need to use the variable, ##{{ data }}, to access the customer and order objects for your transactional email sends.

Here is a list of transactional emails you can customise by using a triggered campaign for it:

  • Account creation campaign ID

  • Account edited campaign ID

  • Password change request campaign ID

  • Password changed campaign ID

  • Order confirmation campaign ID

  • Shipping confirmation campaign ID


Customer account variables

Customer account variables are available for some notification types:

  • Account creation

  • Account edited

  • Password change

Variable

Details

@FIRSTNAME@

Customer first name.

@LASTNAME@

Customer last name.

@EMAIL@

Customer email.

@URL@

Login URL to access a customer account.


Password change request variables

Available for password change request notifications:

Variable

Details

@FIRSTNAME@

Customer first name.

@LASTNAME@

Customer last name.

@EMAIL@

Customer email.

@URL@

Reset password URL that contains a dynamic token.


Order data variables

Order data variables are available for some notification types:

  • Order confirmation

  • Shipping confirmation

You need to use the liquid variable ##{{ data }} to access the order object in context of the transactional email send.


Order data

Variable

Details

data.order.shippable

Returns if the order is able to ship.

data.order.usingMultiShipping

Returns multi shipping.

data.order.orderNumber

Returns the order number.

data.order.priceTotal

Returns the total price of the order.

data.order.creationDate

Returns the date the order was created.

data.order.orderEmail

Returns the email address that’s used for the order.

data.order.productQuantityTotal

Returns the quantity of products the customer orders.


Order totals

Variable

Details

data.order.totals.subTotal

Returns the subtotal of the order.

data.order.totals.totalShippingCost

Returns the total shipping cost of the order.

data.order.totals.grandTotal

Return the grand total of the order.

data.order.totals.totalTax

Returns the total of the order and includes the tax.

data.order.totals.orderLevelDiscountTotalvalue

Returns the order discount at the total level.

data.order.totals.orderLevelDiscountTotalformatted

Returns the order total discount as formatted.

data.order.totals.shippingLevelDiscountTotal.value

Returns the shipping total discount at the total level.

data.order.totals.shippingLevelDiscountTotal.formatted

Returns the shipping total discount as formatted.

data.order.totals.discounts

Returns the total after a discount is applied.

data.order.totals.discountsHtml

Returns the total after a discount is applied in HTML format.


Order steps

Variable

Details

data.order.steps.shipping.iscompleted

  • Returns true if the order shipping steps are complete.

  • Returns false if the order shipping steps are incomplete.

data.order.steps.billing.iscompleted

  • Returns true if the order billing steps are complete.

  • Returns false if the order billing steps are incomplete.


Order items

Variable

Details

data.order.items.items

Returns an array of items.

data.order.items.items[x].uuid

Returns a universal unique identifier (UUID). For example, 11ac0bf84708e1dd50bf0c89d9.

data.order.items.items[x].id

Returns the item ID. For example, nikon-f700-bodyM.

data.order.items.items[x].productName

Returns the product name. For example, Nikon F700 Digital SLR Camera (body only).

data.order.items.items[x].productType

Returns the product type.

data.order.items.items[x].brand

Returns the product brand name. For example, Nikon.

data.order.items.items[x].images

Returns all the images available into an object.

data.order.items.items[x].images.small

Returns an array of all the small images available for the product.

data.order.items.items[x].images.small[x].alt

Returns a small image description. For example, Nikon F700 Digital SLR Camera (body only), small.

data.order.items.items[x].images.small[x].url

Returns the item image URL. For example, /on/demandware.static/-/Sites-electronics-m-catalog/default/dwae25b373/images/small/nikon-f700-body.jpg.

data.order.items.items[x].images.small[x].title

Returns the title for a small image. For example, Nikon F700 Digital SLR Camera (body only).

data.order.items.items[x].images.small[x].index

Returns the index of a small image.

data.order.items.items[x].images.small[x].absURL

Returns the URL for a small image. For example, https://dotmailer01-tech-prtnr-eu04-dw.demandware.net/on/demandware.static/-/Sites-electronics-m-catalog/default/dwae25b373/images/small/nikon-f700-body.jpg.

data.order.items.items[x].variationAttributes

Returns the variation attributes for an item.

data.order.items.items[x].quantity

Returns the quantity of items.

data.order.items.items[x].isGift

  • Returns true if the gift option is selected.

  • Returns false if the gift option isn’t selected.

data.order.items.items[x].renderedPromotions

Returns a promotional item.

data.order.items.items[x].shipmentUUID

Returns a UUID for an item. For example, afafde78c755e8042953c8c96c.

data.order.items.items[x].isBonusProductLineItem

  • Returns true if it's a bonus product line item.

  • Returns false if it isn't a bonus product line item.

data.order.items.items[x].priceTotal.price

Returns the total price of the items.

data.order.items.items[x].priceTotal.renderedPrice

Returns the total price in rendered format. For example, \r\n\r\n\r\n<div class=\"strike-through\r\nnon-adjusted-price\"\r\n>\r\n null\r\n</div>\r\n<div class=\"pricing line-item-total-price-amount item-total-null\">$1,154.30</div>\r\n\r\n.

data.order.items.items[x].options

Returns an array of all options selected.

data.order.items.items[x].options[x].displayName

Returns a display name for an item. For example, Extended Warranty: 2 Year Warranty.

data.order.items.items[x].options[x].optionId

Returns the ID of the option. For example, digitalCameraWarranty.

data.order.items.items[x].options[x].selectedValueId

Returns a select value ID. For example, 001.

data.order.items.items[x].bonusProductLineItemUUID

Returns any bonus product line item UUIDs.

data.order.items.items[x].preOrderUUID

Returns the preorder UUID.

data.order.items.items[x].bonusProducts

Returns any bonus products in the order.

data.order.items.totalQuantity

Returns the total quantity of items ordered.


Order billing address

Variable

Details

data.order.billing.billingAddress.address

Return the order billing address object.

data.order.billing.billingAddress.address.firstName

Returns the order billing address first name of the customer.

data.order.billing.billingAddress.address.lastName

Returns the order billing address last name of the customer.

data.order.billing.billingAddress.address.address1

Returns the first line of the order billing address.

data.order.billing.billingAddress.address.address2

Returns the second line of the order billing address.

data.order.billing.billingAddress.address.city

Returns the order billing address city.

data.order.billing.billingAddress.address.phone

Returns the order billing address phone number.

data.order.billing.billingAddress.address.postalCode

Returns the order billing address postal code.

data.order.billing.billingAddress.address.stateCode

Returns the order billing address state code. For example, AL for Alabama.

data.order.billing.billingAddress.address.countryCode.displayValue

Returns the order billing address country code. For example, United States.

data.order.billing.billingAddress.address.countryCode.value

Returns the order billing address country code value. For example, US for the United States.

data.order.billing.billingAddress.address.salutation

Returns the order billing address salutation.

data.order.billing.billingAddress.address.companyName

Returns the order billing address company name.


Order billing payment methods

Variable

Details

data.order.billing.payment.applicablePaymentMethods

Returns an array of applicable payment methods.

data.order.billing.payment.applicablePaymentMethods[x].ID

Returns an applicable payment method ID. For example, CREDIT_CARD.

data.order.billing.payment.applicablePaymentMethods[x].name

Returns an applicable payment method name. For example, credit card.


Order billing payment cards

Variable

Details

data.order.billing.payment.applicablePaymentCards

Returns an array of applicable payment cards.

data.order.billing.payment.applicablePaymentCards[x].cardType

Returns a payment card type. For example, Visa.

data.order.billing.payment.applicablePaymentCards[x].name

Returns a payment card name. For example, Visa.


Order billing payment instruments

Variable

Details

data.order.billing.payment.selectedPaymentInstruments

Returns an array of the selected payment instruments.

data.order.billing.payment.selectedPaymentInstruments[x].paymentMethod

Returns the payment method. For example, CREDIT_CARD.

data.order.billing.payment.selectedPaymentInstruments[x]amount

Returns the amount. For example, 4242.29.

data.order.billing.payment.selectedPaymentInstruments[x].lastFour

Returns the last four digits of the credit card. For example, 1111.

data.order.billing.payment.selectedPaymentInstruments[x].owner

Returns the name of the credit card owner. For example, Tom S.

data.order.billing.payment.selectedPaymentInstruments[x].expirationYear

Returns the expiration date of the credit card. For example, 2023.

data.order.billing.payment.selectedPaymentInstruments[x].type

Returns the credit card type. For example, Visa.

data.order.billing.payment.selectedPaymentInstruments[x].maskedCreditCardNumber

Returns the masked credit card number. For example, ************1111.

data.order.billing.payment.selectedPaymentInstruments[x].expirationMonth

Returns the expiration month of the credit card. For example, March is 3.


Order billing matching address ID

Variable

Details

data.order.billing.matchingAddressId

Returns the order billing matching address ID. For example, afafde78c755e8042953c8c96c.


Order shipping

Variable

Details

data.order.shipping

Returns an array of all the shipments for this order.

data.order.shipping[x].UUID

Returns an order shipping UUID. For example, afafde78c755e8042953c8c96c.


Order shipping product line items

Variable

Details

data.order.shipping[x].productLineItems.items

Returns array of the items included in this shipment.

data.order.shipping[x].productLineItems.items[x].uuid

Returns the UUID. For example, 11ac0bf84708e1dd50bf0c89d9.

data.order.shipping[x].productLineItems.items[x].id

Returns the product ID. For example, nikon-f700-bodyM.

data.order.shipping[x].productLineItems.items[x].productName

Returns the product name. For example, Nikon F700 Digital SLR Camera (body only).

data.order.shipping[x].productLineItems.items[x].productType

Returns the product type. For example, optionProduct.

data.order.shipping[x].productLineItems.items[x].brand

Returns the brand name. For example, Nikon.

data.order.shipping[x].productLineItems.items[x].images.small

Returns an array of the small images provided for this product.

data.order.shipping[x].productLineItems.items[x].images.small[x].alt

Returns the small images alternative. For example, Nikon F700 Digital.

data.order.shipping[x].productLineItems.items[x].images.small[x].url

Returns the small image URL. For example, /on/demandware.static/-/Sites-electronics-m-catalog/default/dwae25b373/images/small/nikon-f700-body.jpg.

data.order.shipping[x].productLineItems.items[x].images.small[x].title

Returns the small image title. For example, Nikon F700 Digital SLR Camera (body only).

data.order.shipping[x].productLineItems.items[x].images.small[x].index

Returns the index number for a small image. For example, 0.

data.order.shipping[x].productLineItems.items[x].images.small[x].absURL

Returns small image URLs for product line items.

data.order.shipping[x].productLineItems.items[x].variationAttributes

Returns variation attributes for product line items.

data.order.shipping[x].productLineItems.items[x].quantity

Returns the quantity of products.

data.order.shipping[x].productLineItems.items[x].isGift

  • Returns true if the gift option is selected.

  • Returns false if the gift option isn’t selected.

data.order.shipping[x].productLineItems.items[x].renderedPromotions

Returns any product promotions.

data.order.shipping[x].productLineItems.items[x].shipmentUUID

Returns the order shipping matching address ID. For example, afafde78c755e8042953c8c96c.

data.order.shipping[x].productLineItems.items[x].isBonusProductLineItem

Returns true or false if the product line item is a bonus product.

data.order.shipping[x].productLineItems.items[x].priceTotal.price

Returns the total price of the products. For example, $1,154.30.

data.order.shipping[x].productLineItems.items[x].priceTotal.renderedPrice

Returns the total rendered price of the products. For example, $1,154.30.

data.order.shipping[x].productLineItems.items[x].options

Returns all product line options.

data.order.shipping[x].productLineItems.items[x].options[x].displayName

Returns a product order display option. For example, Extended Warranty: 2 Year Warranty.

data.order.shipping[x].productLineItems.items[x].options[x]optionId

Returns the option ID for the product order display. For example, digitalCameraWarranty.

data.order.shipping[x].productLineItems.items[x].options[x]selectedValueId

Returns the selected option value ID. For example, 001.

data.order.shipping[x].productLineItems.items[x].bonusProductLineItemUUID

Returns the bonus product line item UUID.

data.order.shipping[x].productLineItems.items[x].preOrderUUID

Returns the preorder UUID.

data.order.shipping[x].productLineItems.items[x].bonusProducts

Returns the bonus products.

data.order.shipping[x].productLineItems.totalQuantity

Returns the total quantity of items. For example, 3.


Order shipping applicable shipping methods

Variable

Details

data.order.shipping[x].applicableShippingMethods

Returns an array of the applicable shipping methods.

data.order.shipping[x].applicableShippingMethods[x]

Returns the applicable shipping methods.

data.order.shipping[x].applicableShippingMethods[x].ID

Returns the applicable shipping method ID. For example, 002.

data.order.shipping[x].applicableShippingMethods[x].displayName

Returns the shipping method display name. For example, 2-Day Express.

data.order.shipping[x].applicableShippingMethods[x].description

Returns a description about the order shipping. For example, Order received in 2 business days.

data.order.shipping[x].applicableShippingMethods[x].estimatedArrivalTime

Returns the estimated arrival time. For example, 2 Business Days.

data.order.shipping[x].applicableShippingMethods[x].default

Returns the either true or false if the default shipping method is used. For example, false.

data.order.shipping[x].applicableShippingMethods[x].shippingCost

Returns the shipping cost. For example, $20.99.

data.order.shipping[x].applicableShippingMethods[x].selected

Returns true or false if the applicable shipping method is selected. For example, false.

data.order.shipping[x].selectedShippingMethod.ID

Returns the shipping method ID. For example, 001.

data.order.shipping[x].selectedShippingMethod.displayName

Returns the display name for the shipping method. For example, Ground.

data.order.shipping[x].selectedShippingMethod.description

Returns the shipping method description. For example, Order received within 7-10 business days.

data.order.shipping[x].selectedShippingMethod.estimatedArrivalTime

Returns the estimated arrival time of the shipment. For example, 7-10 business days.

data.order.shipping[x].selectedShippingMethod.default

Returns true or false if the shipping method is the default option. For example, true.

data.order.shipping[x].selectedShippingMethod.shippingCost

Returns the shipping cost. For example, $15.99.

data.order.shipping[x].selectedShippingMethod.selected

Returns true or false if the shipping method is selected. For example, true.


Order shipping matching address ID

Variable

Details

data.order.shipping[x].matchingAddressId

Returns the order shipping matching address ID. For example, 333 7th Ave, New York - New York - 10001.


Order shipping address

Variable

Details

data.order.shipping[x].shippingAddress.firstName

Returns the first name of the customer.

data.order.shipping[x].shippingAddress.lastName

Returns the last name of the customer.

data.order.shipping[x].shippingAddress.address1

Returns the first line of the shipping address.

data.order.shipping[x].shippingAddress.address2

Returns the second line of the shipping address.

data.order.shipping[x].shippingAddress.city

Returns the shipping address city.

data.order.shipping[x].shippingAddress.phone

Returns the phone number of the shipping order.

data.order.shipping[x].shippingAddress.postalCode

Returns the postal code of the shipping address.

data.order.shipping[x].shippingAddress.stateCode

Returns the state code of the shipping address. For example, AZ for Arizona.

data.order.shipping[x].shippingAddress.countryCode.displayValue

Returns the country name of the shipping address. For example, United States.

data.order.shipping[x].shippingAddress.countryCode.value

Returns the country code of the shipping address. For example, US.

data.order.shipping[x].shippingAddress.salutation

Returns the salutation for the shipping order.

data.order.shipping[x].shippingAddress.companyName

Returns the company name of the shipping address.

data.order.shipping[x].isGift

Returns True or False if the shipment is a gift or not.

data.order.shipping[x].giftMessage

Returns the included gift message.

Did this answer your question?