Introduction to Variables in Messaging
Variables are placeholders in your SMS and email messages that get replaced with specific data from each recipient's profile or account activity. This allows you to send highly personalized and relevant messages at scale, enhancing engagement and improving the effectiveness of your campaigns.
Setting Up Messages with Variables
Step 1: Access the Messaging Tools
Navigate to the campaign where you want to include personalized SMS or email messages.
Select the ‘Email message’ or ‘SMS message’ action block as required by your campaign flow.
Step 2: Compose Your Message
Start composing your message in the provided text editor for emails or the message box for SMS.
Step 3: Insert Variables
To insert a variable, you typically use a placeholder format encapsulated by curly braces, such as
{{ variable }}.
List of Variables
Personal Information
Use these variables to personalize messages to your recipients:
First Name:
{{ firstName }}
Example: Hello,{{ firstName|default('Friend') }}! → Hello, John! or Hello, Friend! (if the name is missing).
Advanced Example:
{{ (firstName ?? false) ? firstName ~ ', hello!' : 'Hello!' }}
Examples:• firstName = "John" → John, hello!
• firstName empty → Hello!
Last Name:
{{ lastName }}Nickname:
{{ nickname }}Email:
{{ email }}(only available in email templates)Locale:
{{ locale }}— returns the content of thelocalefield from the player's info.
Account Details
Display the user's financial and account information:
Real Money Balance:
{{ balance }}Bonus Balance:
{{ bonusBalance }}Customer ID:
{{ customerId }}Auto Login Token:
{{ loginToken }}Currencies:
Project Currency:
{{ projectCurrency }}Player Wallet Currency:
{{ playerWalletCurrency }}
Advanced Example:
{{ playerWalletCurrency == "EUR" ? "30 EUR" : (playerWalletCurrency == "CAD" ? "50 CAD" : "30 USD") }}
•playerWalletCurrency= "EUR" → 30 EUR•
playerWalletCurrency= "CAD" → 50 CAD• Other or empty → 30 USD
Dates
Dynamically show dates:
Today's date:
{{ "now"|date("Y-m-d") }}
Example: Today is {{ "now"|date("F j, Y") }} → Today is July 1, 2025.Offset Dates:
Yesterday:
{{ "-1 day"|date("Y-m-d") }}Tomorrow:
{{ "+1 day"|date("Y-m-d") }}
Gaming Metrics
Show player's gaming activity (all calculated in the project's main currency):
Casino Bet Sum (converted to project currency):
Lifetime:
{{ casinoBetSum('all') }}Last 7 days:
{{ casinoBetSum(7) }}
Favorite Casino Slot Name by Bet Count:
Lifetime:
{{ favCasinoRealSlotByBetCount('all') }}
Favorite Casino Slot ID be Bet Count:
Lifetime:
{{ favoriteGameId('all') }}Last 7 days:
{{ favoriteGameId(7) }}
Total Casino Real Loss (converted to project currency):
{{ totalCasinoRealLossAmount('all') }}Total Casino Real Win (converted to project currency):
{{ totalCasinoRealWinAmount('all') }}Total Sportsbook Real Loss (converted to project currency):
{{ totalSportbookRealLossAmount('all') }}Total Sportsbook Real Win (converted to project currency):
{{ totalSportbookRealWinAmount('all') }}
Transactions
Last Successful Deposit Amount (converted to project currency):
Amount:
{{ lastSuccessfulDepositAmount() }}
Last Successful Withdrawal Amount (converted to project currency):
Amount:
{{ lastSuccessfulWithdrawalAmount() }}
Total Successful Deposits (converted to project currency):
Amount:
{{ totalSuccessRealDeposit('all') }}Count:
{{ totalSuccessRealDepositCount('all') }}
Total Successful Withdrawals (converted to project currency):
Amount:
{{ totalSuccessRealWithdrawal('all') }}Count:
{{ totalSuccessRealWithdrawalCount('all') }}
Median Successful Deposit Amount:
{{ medianSuccessfulRealDepositAmount('all') }}Average Successful Deposit Amount:
{{ averageSuccessfulRealDepositAmount('all') }}
Unsubscribe Link
Include a clear unsubscribe option for emails:
{{ unsubscribeUrl }}
Public Preview Link (email only)
Let recipients open a web version of the email they received, with all variables already rendered for them.
Public Preview URL:
{{ publicPreviewUrl }}
If you include this variable in an email, InTarget generates a unique URL at send time in the following format:
https://api.intarget.app/v2/email-preview/{id}
Opening the link shows the email preview with all generated variables in place — the same content the recipient got in their inbox.
Things to know:
This variable works in emails only.
The generated URL stays active for 2 months after the email is sent.
Random Text
Randomize text to make your communication dynamic:
Syntax: {{ random(['Option1', 'Option2', 'Option3']) }}
Example: Hello, {{ random(['John', 'Mark', 'Alex']) }}!
Possible outputs:
Hello, John!
Hello, Mark!
Hello, Alex!
Custom Parameters
If your project passes custom parameters to InTarget, you can use their values in messages just like any standard variable.
Syntax: {{ extra('paramName') }}
Where paramName is the exact name of the custom param configured in your project.
Example: Your status: {{ extra('internal_status') }} → returns the value of the internal_status custom param for the recipient.
Check with InTarget team to confirm which custom params are available in your project and their exact names.
