Variables are short pieces of code that you can add to an email or text message to automatically insert information about the recipient or the activity that triggered the message.
Variables use a field name enclosed in curly brackets, like this: {first_name}
When the message is sent, Kartra replaces the variable with the information available for that recipient or event.
For example, if your email contains:
Hi {first_name},
and the recipient's first name is John, they will see:
Hi John,
Variables are sometimes called merge fields, mail merge fields, data tags, or placeholders in other systems.
Where you can use variables
Variables are available in message editors throughout Kartra. Depending on the message, you can use them in areas such as the email body, subject line, and preview text.
The variables available depend on what you're sending and what information Kartra has when the message is sent.
Contact variables
Variables based on information in a contact's profile can be used more broadly in Kartra.
For example, you can use contact variables to personalize an Email or Sequence email with information such as the recipient's name.
Variables for specific Kartra assets
Some variables are linked to specific Kartra assets and can only be used in Notifications related to those features.
For example:
Transactional variables are used in Notifications related to products and purchases.
Calendar variables are used in Notifications related to appointments.
Membership variables are used in Notifications related to memberships and their content.
In short, you can use a purchase variable such as the product name in a purchase Notification, but not in a calendar Notification.
See Kartra variables: complete reference list to find the variables available for each type of message.
What happens when information isn't available?
Kartra can only replace a variable when the corresponding information is available.
For example, if you use a variable for a contact's phone number but that information isn't available for the recipient, the variable will appear blank in the message.
Before using a variable, make sure it's supported for the type of message you're creating.
See Kartra variables: complete reference list to find available variables and where they can be used.
Test emails and variables
When you use Send test email, variables are replaced with the word TEST.
The Send test email functionality isn't connected to a contact profile or to the event that would normally provide information for the variables. This means variables won't display real contact, purchase, appointment, or other personalized information in a test email, even if you send the test to an email address that belongs to one of your contacts.
To check how variables populate with real information, test the message using the relevant live workflow.
Learn more in Test emails before sending.
