Skip to main content
Variables are placeholders in email and SMS content that are replaced with a value when a message is sent. For background, see How personalization variables work.

Syntax

Write a variable as its name between double curly braces. Spaces inside the braces are optional.
A name is a path separated by dots. The first part says where the value comes from, and the rest names the property. To reach a value nested inside metadata, add a part for each level: {{ customer.address.city }} reads city from the address object in the customer’s metadata.

Customer variables

Filled from the customer receiving the message. A metadata key with the same name as a built-in property replaces it. For example, a first_name key in metadata is used for customer.first_name.

Business variables

Filled from the business sending the message.

Event variables

Available in triggers that listen for a project-defined event. Filled from the event that started the trigger.

Campaign and trigger variables

campaign. variables are available in campaigns, and trigger. variables in triggers.

Missing values

A value is missing when the property does not exist or is null. A message that uses a variable with a missing value is not sent to that recipient. An empty string is a value, and is filled in as nothing. A campaign cannot be started if one of its messages uses a variable that does not start with customer., business. or campaign..

Endpoints

In available_variables, business. variables have a value because it is the same for every recipient. customer. variables have a null value because it differs for each recipient. metadata keys that start with an underscore are left out of both lists.