Placeholders
In this page you'll learn how to use placeholders in the content of your Push, Email and SMS messages, in-app messages and asset groups. Placeholders are system variables, user data fields, import or event data displayed in push messages, email and text messages. Usually, you can use these to personalize the content of your messages. They can also be included in links (as query parameters) in order for you retrieve a reference to the user or interaction.
System Placeholders
These placeholders contain data that is collected (in some cases automatically) by our SDK or subscription forms for Email or SMS.
Push
These placeholders are available by default in all your push notifications:
- {{userName}}
- {{userID}}
- {{subscriptionId}}
- {{deviceID}}
- {{notificationId}}
- {{platform}}
- {{sdkVersion}}
- {{language}}
- {{transport}}
Additionally, in push notifications content of geo-triggers, you can also use the following placeholders:
- {{regionIcon}}
- {{regionName}}
- {{regionId}}
- {{regionReferenceKey}}
- {{regionAddress}}
- {{regionDescription}}
And if your geo-trigger is based on a beacon, these placeholders are also available:
- {{beaconName}}
- {{beaconId}}
These placeholders are available by default in all your email messages:
- {{userName}}
- {{userID}}
- {{subscriptionId}}
- {{deviceID}}
- {{notificationId}}
- {{language}}
SMS
These placeholders are available by default in all your text messages:
- {{userName}}
- {{userID}}
- {{subscriptionId}}
- {{deviceID}}
- {{notificationId}}
- {{language}}
In-App Messages and Asset Groups
These placeholders are available by default in all your in-app messages and asset groups:
- {{userName}}
- {{userID}}
- {{subscriptionId}}
- {{deviceID}}
- {{notificationId}}
- {{platform}}
- {{sdkVersion}}
- {{language}}
- {{transport}}
User Data Fields
If you've defined user data fields for your application, as described in this page, and you've populated these fields using our SDK or import jobs, you can then also use user data fields' placeholders.
These fields can then be added to the content of any push, email, SMS, in-app messages and asset groups pretty much the same way as you would with our system placeholders.
The only difference is that these placeholders are defined by using {{userData.xxx}}
, where xxx
should be the key assigned to the user data field.
Import Jobs
If you create an import job of type Batch Private Messages Import or Batch Grouped Messages Import, you can include data in your CSV that can be used as placeholder content of your messages.
By default, you will use these in your content by supplying the name of the column defined in your import file, which is a value prefixed with notification_
.
For example, if your import job contains the following data:
userID,notification_name,notification_points
joris@notifica.re, Joris, 50
You can then use them in your messages as follows:
Additionally, if you configure your import job to ignore the prefix, as follows:
Then you can simply use your placeholders as follows:
Event-Based Campaigns
If you use event-based campaigns, where you can send messages whenever a certain event is created in our platform, you can also use any data included in the event in the content of your messages. These are also pretty similar to all the other types of placeholders described above. For example, if you register an event, via our SDK, as follows:
let data = ["name": "Joris", "points": "50"]
Notificare.shared.events().logCustom("PURCHASE", data: data) {}
Or via our API as follows:
{
"data": {
"name": "Joris",
"points": "50"
}
}
Then you can simply use your placeholders as follows:
It is also important to note, that you can use placeholders for simple objects contained in your data. Consider the following event data:
{
"data": {
"name": {
"firstName": "Joris",
"lastName": "Verbogt"
},
"points": "50"
}
}
You can then use it as a placeholder as follows:
About Modifiers
Placeholders also accept modifiers. These help you format the content before it is displayed (eg. {{deviceID|urlencode}}
). Currently, you can use escape (useful when included in HTML content), urlencode (useful when a placeholder is used in a href attribute) or date, time or datetime to format date values.
Date modifiers also support the following formatting styles: full
, long
, medium
or short
. The following table contains examples for all the possible usages of this modifier:
Modifier | Output |
---|---|
date_full | Monday, May 26, 2025 |
date_long | May 26, 2025 |
date_medium | May 26, 2025 |
date_short | 5/26/25 |
time_full | 6:30:36 PM GMT+02:00 |
time_long | 6:30:36 PM GMT+2 |
time_medium | 6:30:36 PM |
time_short | 6:30 PM |
datetime_full | Monday, May 26, 2025 at 6:30:36 PM GMT+02:00 |
datetime_long | May 26, 2025 at 6:30:36 PM GMT+2 |
datetime_medium | May 26, 2025, 6:30:36 PM |
datetime_short | 5/26/25, 6:30 PM |
It is important to highlight that, by default, we will use the device's language and region to determine the locale of these formatting styles. In the table above we are using en-US which is the default value when no language or region is associated with the device.
There is only one exception, and that's when these modifiers are used in localized content. When used in a localized piece of content, we will use the language and region defined in the content instead.
The language and region used influences how dates are displayed, for example 5/26/25 would be how a date would be displayed for en-US while 26/5/25 would be the style used for nl-NL users or content.
Finally, it is also important to note that we will compute all dates and times according to the device's timezone, if it has one, otherwise we will use UTC.
However, you can override this behavior and provide a timezone in the modifier too (e.g. {{myDate|datetime_full_Europe_Amsterdam}}
).
As an example, if you have a placeholder containing the following date: 2025-05-26T16:30:36.456Z, the modifier {{myDate|datetime_full}}
would output Monday, May 26, 2025 at 6:30:36 PM GMT+02:00 for a user with a device, email contact or phone number in Central European Time.
But the same data placeholder using {{myDate|datetime_full_Europe_Lisbon}}
would display Monday, May 26, 2025 at 5:30:36 Western European Summer Time instead. This might be useful if you want to display date and/or time in a specific timezone instead of the device's timezone.