Notification Strings
Notification strings are customizable message templates you create on the Creator Dashboard. To send any notification, you first need to create a corresponding notification string.
Creating a Notification String
Follow these steps to create a notification string:
- Navigate to the Creator Dashboard.
- Click on the experience you want to configure.
- In the left sidebar, under Engagement, click on Notifications.
- Click the Create a Notification String button.
- You will need to fill in two fields:
- Identifier Name: A name for your own reference (e.g., “DailyReward”). This is not visible to players.
- Notification String: The message that will be sent to the player. This has a 99-character limit.
- Click Create Notification String.
- After creation, find your new notification string in the list. Click the … button in the Actions column and select Copy Asset ID.
This Asset ID is the asset_id you will use when calling notifier.notify().
Using Parameters
You can personalize notifications by using parameters in your string. Parameters are defined using curly braces {}.
Custom Parameters
You can define your own custom parameters to insert dynamic values into your notifications.
Example String:
You're {numQuests} quests away from completing the weekly challenge!
When you send the notification, you can provide a value for numQuests in the string_parameters table.
notifier.notify(player, {
asset_id = "YOUR_ASSET_ID_HERE",
string_parameters = {
numQuests = 5
}
})Special Parameters
Roblox provides special parameters for common use cases:
{experienceName}: Automatically inserts your experience’s name into the notification.{userId-{suffix}}: Used to mention another player. For example, you could use{userId-friend}or{userId-challenger}as placeholders in your string.
When using a userId parameter, the full placeholder (e.g., userId-challenger) is the key you use in the string_parameters table, and the value must be the player’s UserId.
Example String:
{userId-highScorer} beat your high score by {points} points!
notifier.notify(player, {
asset_id = "YOUR_ASSET_ID_HERE",
string_parameters = {
["userId-highScorer"] = 12345678, -- The UserId of the high scorer
points = 1000
}
})Note
For a notification using {userId-{suffix}} to be delivered, the recipient and the mentioned user must be friends on Roblox.