Using and formatting variables

Variables can be use in editable text areas in content blocks and custom HTML blocks with emails

You can use any of the below like so:

{{ amount }}

or

{{  highestAverageRating }}

Available Variables

Some of the variables below output the same result, and are separated by an &

amount &
receipt.formattedAmount
Applies to Receipts only. The total order amount.
averageRating The average rating from all the product reviews you've received (two decimal places)
companyName & user.company.name
& template.company.name
The name of your company
currency The currency set in your Company Profile in your settings
date.iso The order date & time (for receipts), today's date and time in other email types, in the ISO format
day & date.day The order day (for receipts), today's day in other email types
discount Can only be used when a discount content block is used. Discounts the discount amount including percentage or currency
email The customers email address
expiryPeriod Can only be used when a discount content block is used. Displays the number of days until the coupon expires.
firstName Customer's first name. If we don't have a first name (for some abandoned carts or subscribers where a first name wasn't captured) then it will show their email address, so set a fallback here (see "Setting a fallback" below)
fiveStarReviews The number of five star product reviews you've received
fourStarReviews The number of four star product reviews you've received
fullDate & date.full The order date and time (for receipts), today's date and time in other email types
happinessRating The percentage of customers who've given positive ratings using our Feedback feature
highestAverageRating Applies to Abandoned Cart only. Displays the average rating in stars for the product with the highest rating of all the products left in the cart (ratings must have been left via Conversio's product reviews feature)
lastName Customer's last name
month & date.month The order month (for receipts), today's month in other email types
reference & 
receipt.reference
Applies to Receipts only. The order number.
threeStarReviews The number of three star product reviews you've received
totalReviews The total number of product reviews you've received
user.store.url The url of your store, from "Company Store URL" in your Company Profile in settings
year The order year (for receipts), today's year in other email types

Setting a fallback

If you want to set a fallback, you can do so like this:

Hi {{ firstName or 'friend' }}!

Output (where we have no first name):

Hi friend!

Formatting your variable

You can adjust the output of your variable in the following ways:

Capitalize

Make the first letter uppercase, the rest lower case

{{ firstName | capitalize }}

Output:

Becs

Lower

Makes it lowercase

{{ firstName | lower }}

Output:

becs

Title

Makes the first letter of each word capitalized, the rest lower case

{{ companyName | title }}

Output:

My Awesome Clothing Company

Upper

Makes all the letters capitalized

{{ firstName | upper }}

Output:

BECS

Trim

Strips spaces before, between and after

{{ companyName | trim }}

Output:

Myawesomeclothingcompany

Truncate

Return a truncated copy of the string. The length is specified with the first parameter which defaults to 255. If the second parameter is true the filter will cut the text at length. Otherwise it will discard the last word. If the text was in fact truncated it will append an ellipsis sign ("..."). A different ellipsis sign than "(...)" can be specified using the third parameter.
Truncate to 3 characters:
{{ companyName | truncate(3) }}

Output:

My (...)

Truncate to 6 characters and replace "..." with a "?":

{{ companyName | truncate(6, true, "?") }}

Output:

My awe ?

Combining multiple formatting options

Use the pipe symbol | to separate multiple options

{{ companyName | truncate(8) | capitalize }}

Output:

MY AWESO

Still need help? Contact Us Contact Us