Templating syntax and personalization reference guide

Last updated: July 11, 2025

Overview

This guide contains available personalization tags for email and SMS.

For information on how to use templating syntax and personalization tags, see 📄 How to use templating syntax based personalization.


Standard personalization tags

The personalization tags below can be used in both email and SMS messages. The data for these tags (except the unsubscribe link) is stored in contacts' profiles.

Personalization name

Personalization tag

Display Example

Notes

First Name

{{ contact.first_name }}

John

Last Name

{{ contact.last_name}}

Doe

Full Name

{{ contact.full_name }}

John Doe

Email

{{ contact.email }}

johndoe@sendlane.com

Phone

{{ contact.phone }}

+1123467895

Unsubscribe

{{ subscription.unsubscribe_link }}

This link points to the subscription preferences page

Custom Field

{{ contact.custom('FIELD_ID') }}

or

{{ contact.custom('FIELD_NAME') }}

Custom data

Replace FIELD_ID with the custom field's ID or replace FIELD_NAME with the custom field's name


Shopify and BigCommerce options

Standard Shopify and BigCommerce options

Use the syntax shown in the furthest left column of the table below in an email or SMS message in an automation using any of the noted triggers in the furthest right column:

Syntax

Notes

Automation triggers

  1. {{ trigger.getCheckoutCartUrl }}

  2. {{ trigger.getCheckoutProductName }}

  3. {{ trigger.getCheckoutProductPrice }}

  4. {{ trigger.getCheckoutProductUrl }}

  5. {{ trigger.getCheckoutProductVariantName }}

  6. {{ trigger.getCheckoutProductVariantPrice }}

  7. {{ trigger.getCheckoutProductVariantUrl }}

Shows a checkout's:

  1. Link to cart

  2. Name of included product

  3. Price of included product

  4. Link to included product

  5. Name of included product variant

  6. Price of included product variant

  7. Link to included product variant

Abandoned Checkout

Checkout Complete

  1. {{ trigger.getOrderProductName }}

  2. {{ trigger.getOrderProductPrice }}

  3. {{ trigger.getOrderProductUrl }}

  4. {{ trigger.getOrderProductVariantName }}

  5. {{ trigger.getOrderProductVariantPrice }}

  6. {{ trigger.getOrderProductVariantUrl }}

Shows an order's:

  1. Name of included product

  2. Price of included product

  3. Link to included product

  4. Name of included product variant

  5. Price of included product variant

  6. Link to included product variant

Order Placed

  1. {{ trigger.productname }}

  2. {{ trigger.productprice }}

  3. {{ trigger.productimageurl }}

  4. {{ trigger.producturl }}

Shows a product's:

  1. Name

  2. Price

  3. Image URL

  4. URL

Product Purchase
Product Variant Purchase

Product Viewed

Abandoned Product Viewed

Order Fulfilled

Order Cancelled

Order Refunded

Order Placed (Frequency)

Advanced Shopify and BigCommerce options

You can use the json_encode function in an automation email using one of the triggers noted in the furthest right column to insert any additional data that your store may provide.

To see all available options:

  1. Create an automation with at least one of the qualifying triggers noted in the table below

  2. Add an email node to the automation

  3. Add a text block to the email

  4. Paste the order, product, or checkout syntax in the text box

  5. Click Preview

  6. Review available options (copy to a text file or paste into a JSON beautifier for easy reference)

  7. Remove the syntax from the text block

Syntax

Notes

Triggers

{{ trigger.order.value }}

Replace value with any available items shown by the json_encode function

Order Placed

{{ trigger.product.value }}

Replace  value with any available items shown by the json_encode function

Product Purchase

Product Variant Purchase

Product Viewed

Abandoned Product Viewed

{{ trigger.productvariant.value }}

Replace   value with any available items shown by the json_encode function

Product Purchase

Product Variant Purchase

Product Viewed

Abandoned Product Viewed


Filters

Personalization tags can be modified by the filters below. In templating syntax filters are separated from personalization tags by a pipe symbol ( |).

Multiple filters can be used on the same personalization tag. When multiple filters are present, they cascade from left to right.

Function

Tag

Display Example

Notes

Email

SMS

Capitalize

{{'text'|capitalize}}

{{contact.first_name|capitalize}}

Text

Jimmy

Will capitalize the first letter in a string

✅

✅

Date

{{"now"|date("m/d/y")}}

01/01/2023

Inserts the date the message was sent in the specified format. Month, day, and year can be rearranged or removed. - can be used instead of /

✅

✅

Date Modify

{{"now"|date_modify("+1 day")|date("m/d/Y")}}

01/01/2023

The date_modify function allows you to add or subtract a specified number of days, months, or years to a date.

✅

✅

First

first in a tag like {{trigger.getOrder().name|first}}

Displays the first item in the specified list or array

✅

🚫

Last

last in a tag like {{trigger.getOrder().name|first}}

Displays the last item in the specified list or array

✅

🚫

Lower

lower in a tag like {{contact.first_name|lower}}

sendlane

Returns a string in all lowercase

✅

✅

Upper

upper in a tag like {{contact.first_name|upper}}

SENDLANE

Returns a string in all uppercase

✅

✅

Title Case

title in a tag like {{'here is some text'|title}}

Here Is Some Text

Returns a string in title case

✅

✅

Number Format

{{ |number_format(0, '.', ',') }}

Set the number of decimal places (0), decimal point(s) '.', and thousands separators ',' in any number

✅

🚫

Random

{{ random(['value1','value2','value3']) }}

value2

Returns a random value from the list

✅

✅

Raw

raw in a tag like {{product.name|raw}}

Returns the raw information for the specified value rather than adjusting special characters

✅

🚫


VAR personalization tags

VAR personalization tags are still functional but no longer being updated. We recommend you use personalization tags whenever possible.

Tag Name

Tag Code

Display Example

Site name

VAR_SITE_NAME

Sendlane

Site URL

VAR_SITE_URL

https://www.sendlane.com

Contact first name

VAR_FIRST_NAME

John

Contact last name

VAR_LAST_NAME

Doe

Contact full name

VAR_FULL_NAME

John Doe

Contact email

VAR_EMAIL

john@sendlane.com

Contact phone number

VAR_SUBSCRIBER_PHONE

888-927-2664

Contact mailing address 

VAR_MAILING_ADDRESS

Sendlane, 10620 Treena Street Suite 250, San Diego, CA, US 92131

Contact country 

VAR_COUNTRY

United States

Contact state

VAR_STATE

California

Contact city

VAR_CITY

San Diego

Contact opt-in date

VAR_SUBSCRIBE_DATE

2020-05-01

Contact IP address

VAR_SIGNUP_IP

172.16.174.1

Formatted date

VAR_FORMATTED_DATE

May 1, 2020

Date

VAR_DATE

2020-05-01

Time

VAR_TIME

16:32:41

Year

VAR_YEAR

2020

Month

VAR_MONTH

May

Day

VAR_DAY

Tuesday

Time sent

VAR_TIME_SENT

18:39:29

Date & time

VAR_DATE_TIME

2020-05-01 16:32:41

Day, date & time

VAR_DAY_DATE_TIME

Fri, May 1, 2020 4:32 PM

Day, date & time

VAR_DAY_DATE_TIME

Fri, May 1, 2020 4:32 PM

Campaign ID

VAR_CAMPAIGN_ID

1

Automation ID

VAR_AUTOMATION_ID

2