Giftpurchase
- Alert key:
fourthwall-giftpurchase - Source: Fourthwall
- Event list label: Gift Purchase
- Carries alert image: yes (
extraSettings.contentImage)
Default message template
{{username}} just bought a gift with amount {{amount}}
Template variables
Use any of these in alert text, TTS, or chat templates. The same names appear under data.extraSettings.* when you subscribe via Overlay.on('alert').
| Template variable | Overlay payload field | Description |
|---|---|---|
{{username}} | data.extraSettings.username | The username of the sender |
{{email}} | data.extraSettings.email | Email of user |
{{message}} | data.extraSettings.message | The message text sent by the user |
{{currency}} | data.extraSettings.currency | The currency used |
{{amount}} | data.extraSettings.amount | The amount sent |
{{friendlyId}} | data.extraSettings.friendlyId | No description available yet. |
{{quantity}} | data.extraSettings.quantity | No description available yet. |
{{offer}} | data.extraSettings.offer | No description available yet. |
{{offerImageUrl}} | data.extraSettings.offerImageUrl | No description available yet. |
{{gifts}} | data.extraSettings.gifts | No description available yet. |
{{giftCount}} | data.extraSettings.giftCount | TikTok battle gift count for this progress update |
{{winners}} | data.extraSettings.winners | No description available yet. |
{{winnerNames}} | data.extraSettings.winnerNames | No description available yet. |
{{winnerCount}} | data.extraSettings.winnerCount | No description available yet. |
{{firstWinner}} | data.extraSettings.firstWinner | No description available yet. |
{{availableGiftCount}} | data.extraSettings.availableGiftCount | No description available yet. |
{{redeemedGiftCount}} | data.extraSettings.redeemedGiftCount | No description available yet. |
{{createdAt}} | data.extraSettings.createdAt | No description available yet. |
{{raw}} | data.extraSettings.raw | The raw data that comes in through the platform for the alert. This is useful for custom code when data is needed that we don't provide by default. |
Example payloads
Each scenario below mirrors what Lumia emits in Overlay.on('alert', (data) => …).
$100
{
"alert": "fourthwall-giftpurchase",
"dynamic": {
"value": 100,
"currency": "USD"
},
"extraSettings": {
"username": "lumiastream",
"avatar": "https://static-cdn.jtvnw.net/jtv_user_pictures/2b1fa336-f9b2-42cf-bd2c-98675da74982-profile_image-70x70.png",
"amount": 100,
"currency": "USD",
"contentImage": "https://cdn.fourthwall.com/storefront-en/_next/image?url=https%3A%2F%2Fcdn.fourthwall.com%2Fpublic%2Flogos%2Ffw-logo-stacked-purple.png",
"email": "",
"message": "",
"friendlyId": "",
"quantity": "",
"offer": "",
"offerImageUrl": "",
"gifts": "",
"giftCount": "",
"winners": "",
"winnerNames": "",
"winnerCount": "",
"firstWinner": "",
"availableGiftCount": "",
"redeemedGiftCount": "",
"createdAt": "",
"raw": ""
}
}
$200
{
"alert": "fourthwall-giftpurchase",
"dynamic": {
"value": 200,
"currency": "USD"
},
"extraSettings": {
"username": "lumiastream",
"avatar": "https://static-cdn.jtvnw.net/jtv_user_pictures/2b1fa336-f9b2-42cf-bd2c-98675da74982-profile_image-70x70.png",
"amount": 200,
"currency": "USD",
"contentImage": "https://cdn.fourthwall.com/storefront-en/_next/image?url=https%3A%2F%2Fcdn.fourthwall.com%2Fpublic%2Flogos%2Ffw-logo-stacked-purple.png",
"email": "",
"message": "",
"friendlyId": "",
"quantity": "",
"offer": "",
"offerImageUrl": "",
"gifts": "",
"giftCount": "",
"winners": "",
"winnerNames": "",
"winnerCount": "",
"firstWinner": "",
"availableGiftCount": "",
"redeemedGiftCount": "",
"createdAt": "",
"raw": ""
}
}
$300
{
"alert": "fourthwall-giftpurchase",
"dynamic": {
"value": 300,
"currency": "USD"
},
"extraSettings": {
"username": "lumiastream",
"avatar": "https://static-cdn.jtvnw.net/jtv_user_pictures/2b1fa336-f9b2-42cf-bd2c-98675da74982-profile_image-70x70.png",
"amount": 300,
"currency": "USD",
"contentImage": "https://cdn.fourthwall.com/storefront-en/_next/image?url=https%3A%2F%2Fcdn.fourthwall.com%2Fpublic%2Flogos%2Ffw-logo-stacked-purple.png",
"email": "",
"message": "",
"friendlyId": "",
"quantity": "",
"offer": "",
"offerImageUrl": "",
"gifts": "",
"giftCount": "",
"winners": "",
"winnerNames": "",
"winnerCount": "",
"firstWinner": "",
"availableGiftCount": "",
"redeemedGiftCount": "",
"createdAt": "",
"raw": ""
}
}
Variation conditions
Dimensions you can branch on when configuring alert variations:
RANDOMEQUAL_CURRENCY_NUMBER- Donation Amount is equal toGREATER_CURRENCY_NUMBER- Donation Amount is greater than or equal toEQUAL_VARIABLE
Related
- Alert Explorer - live preview of every alert
- Overlay Type Definitions - full
AlertEventTypeScript type