When creating your email or mobile message, it’s always a great idea to personalize your messages as much as possible! To do this, you can use merge variables. A merge variable displays a value from a designated variable.
For example, you can use the merge variable {{firstName}} to personalize your recipients’ first names. When the email is sent, the merge variable will be replaced with the recipient’s first name.
For example, let’s say that you’re sending an email to someone named Anna. Anna’s first name is saved in Clutch along with her email address and some other demographic information.
The email content you’ve written out like this:
Will appear to Anna like this:
Using Merge Variables
Merge variables will work across both scheduled and campaign emails unless specified in notes within the table below. To use a merge variable, copy and paste the variable code (including the double braces) into the body of your email.
Pro-Tip: When considering the {{firstName}} merge variable, if the customer has a first name in the Clutch database, their first name will populate. However, if no first name is present, you can set it up to populate as “Loyalty Member” (for example) as the default. This is set up as {{firstName default=”Loyalty Member”}}. If desired, you can make changes to fill in another demographic field if the first name is not populated. For example, you can change the default to the last name by using the merge variable {{firstName default=”((lastName))”}} instead. |
Merge Variable List
Below is a list of merge variables that may be available to you for your reference. Note that what is usable to your brand may vary depending on your integration with Clutch.
Card Details
Name | Variable Code |
Card Number | {{cardNumber}} |
Card Pin | {{cardPin}} |
Customer Demographics
Name | Variable Code |
Custom Demographics Fields* | eg. {{demographics field=”preferredFragrance”}} |
Address 2 | {{address2}} |
Address | {{address}} |
Age | {{age}} |
Birthday | {{birthday}} |
City | {{city}} |
Country | {{country}} |
{{email}} | |
Enrollment | {{enrollment}} |
First Name | {{firstName}} |
Full Name | {{fullName}} |
Gender | {{gender}} |
Last Name | {{lastName}} |
Phone | {{phone}} |
Postal Code | {{postalCode}} |
State | {{state}} |
Zip Code | {{zipCode}} |
*All fields in the customer model are available. Use the name of the demographics field in the variable code. In this example, the field name is preferredFragrance.
General
Name | Variable Code | Notes |
Date | eg. {{date}} or {{date add=”6″ datepart=”D|W|M|Y” dateformat=”MM/DD/YYYY”}} | Displays today’s date (the send date) or generates a date in the future or the past based on paramaters. Specify the type of time you want to add or remove (eg. M (month), D (days)) and the number (add = 6 or -6). |
45 Days Later | {{45DaysLater}} | 45 days from send date. |
Email Confirmation Link | {{emailConfirmationLink}} | Generates a link to the Clutch CASL subscription confirmation page where users can confirm their subscription. |
Next Month | {{nextMonth}} | Generates the next month from current date. |
Opt Out Link | {{optOutLink}} | Generates a link to the Clutch hosted subscription preferences page where users can unsubscribe. |
Tomorrow | {{sendDateTomorrow}} | Tomorrow’s date from send date. |
Send Date | {{sendDate}} | The send date of the message. |
Send Month | {{sendMonth}} | Current month of send date. |
Location Information
Name | Variable Code |
Location Address | {{locationAddress}} |
Location City | {{locationCity}} |
Location Hours on Saturday | {{locationHoursSat}} |
Location Hours on Sunday | {{locationHoursSun}} |
Location Hours of Week | {{locationHoursWeek}} |
LocationManager | {{locationManager}} |
Location Name | {{locationName}} |
Location Owner | {{locationOwner}} |
Location Phone | {{locationPhone}} |
Location State | {{locationState}} |
Location Website | {{locationWebsite}} |
Location Zip Code | {{locationZip}} |
Location External ID | {{location}} |
Balance Data
Name | Variable Code | Notes |
Currency Balance by Type | eg. {{balance balanceType=”Points”}} | Current balance by balance type. In this example, the balance type is Points. Other options are Punches, Cashback, Custom. |
Last Purchase Date Expiration | eg. {{lastPurchaseDateExpiration add=”6″ datepart=”M” dateformat=”MM/dd/YYYY”}} | Calculates a future date for expiration based on the customers last checkout date. Defaults to 12 months from last purchase date. Specify the type of time you want to add (eg. M (month), D (days)) and the number (add = 6). |
Next Points Reward | eg. {{nextPointsReward thresholdAmount=”100″}} | Calculates how far the customer is from earning their next points reward based on current balance and threshold passed in to variable. |
Next Punches Reward | eg. {{nextPunchesReward thresholdAmount=”5″}} | Calculates how far the customer is from earning their next punches reward based on current balance and threshold passed in to variable. |
Next Reward | eg. {{nextReward balanceType=”Points” thresholdAmount=”500″}} | Calculates how far the customer is from earning their next reward based on current balance and threshold passed in to variable. |
All Current Balances | {{balances}} or {{balance returnType=”compact”}} | All current balances in JSON format. |
Current Currency Balance | {{currentCurrencyBalance currencyCode=”USD”}} | Current currency balance on card for given currency code. |
Current Point Balance | {{currentPointBalance}} | – |
Current Punches Balance | {{currentPunchBalance}} | – |
Current Reward Balance | {{currentRewardBalance balanceCode=”cashback” decimalAmount=”2″}} | Current reward balance by balance type. Optional to specify number of decimal places. |
Last Purchase Date | {{lastPurchaseDate}} | Last checkout data for customer return in MM/DD/YYY format. |
Transactional Data
Name | Variable Code | Notes |
API Call Type | {{apiCallType}} | Campaign only. The API call type. |
Balance Mutations | {{balanceMutations}} | Campaign only. The balance mutations for the current request. |
External Request Reference | {{externalRequestRef}} | Campaign only. The value provided in the externalTransactionId header field for the current API call. |
External Transaction Id | {{externalTransactionId}} | Campaign only. The value provided in the externalTransactionId header field for the current API call. |
Old Card Number from Transfer | {{oldCardNumber}} | Campaign only. Displays the old card number on a card transfer transaction. |
Request Reference | {{requestRef}} | Campaign only. The request ref of the current API call, may be used for third party integrations. |
Terminal | {{terminal}} | Campaign only. Displays the terminal ID from the transaction. |
New Card Number from Transfer | {{transferIn}} | Campaign only. Displays the new card number on a card transfer transaction. |
Optional Parameters
Name | Variable Code | Notes |
Masking | eg. {{cardNumber maskValue=”4″}} | Masks a variable by the number of characters specified. Masks from left to right. |
Case Adjustment | eg. {{firstName caseAdjustment=”upper”}} | Formats the string. Options are: upper, lower, proper and none. |
Encode | eg. {{locationCity encode=”url”}} | Formats the string for a url by removing spaces. |