1 Two sources, one player experience
Swivel has two notification types. They use different triggers and content rules, but both create the
same per-player notification record and appear in the same notification drawer.
📣
Campaign-driven
CRM notification
A reusable content resource selected by a CRM campaign and awarded to a targeted player.
- The campaign decides who receives it and when.
- Content is static; there are no event placeholders.
- Works with the configured CRM provider, including Optimove and Smartico flows.
⚙️
Event-driven
System notification
A template tied to a known backend event, rendered with values from that event for one player.
- The platform event decides who receives it and when.
- Title and text can use kind-specific placeholders.
- Only one template can exist for each system kind.
2 Shared delivery pipeline
Once either source requests delivery, the same asynchronous pipeline handles persistence, duplicate
protection, live updates, and the player UI.
🎯
TriggerCRM award or platform event
📨
Queue jobUser, template and idempotency key
🧩
Resolve contentStatic CRM copy or rendered system template
🗃️
StorePer-player notification and expiration
🔔
DisplayLive toast, unread count and drawer
Idempotency
Every delivery request carries an idempotency key. That key is unique on the per-player record, preventing
the same campaign award or system event from creating the same notification twice.
Expiration
If the template has an expiration duration, expiresAt is calculated when the player receives the
notification. Expired items are excluded from the drawer and unread count.
3 CRM notification lifecycle
CRM notifications are content resources. Creating one does not send it; a campaign or CRM callback
must award it to a player.
1
Create the resource in Admin
Configure title, message, optional expiration, image and call to action. Swivel stores it as type
crm.
2
Expose it to the CRM
For Optimove, a worker creates a notification channel template and saves its external template ID. For
Smartico, active CRM notifications are exposed through the CRM database view.
3
Reference it in a campaign
Optimove maps its channel template ID back to the Swivel resource. Smartico can attach a notification
template ID to a bonus, package or tournament award.
4
Award it to selected players
The CRM supplies the player, resource and delivery identity. Prescheduled Optimove campaigns may delay
the queue job until the campaign schedule time; real-time awards are queued immediately.
⚠️
Archiving is not campaign cancellation
Archiving removes a CRM notification from the active Admin view and Smartico's active notification view,
but the delivery worker does not apply a universal archive check to CRM awards. Stop or update active CRM
campaigns as well, especially when awards may already be scheduled.
4 System notification kinds
A system template is selected by kind. The backend supplies only the values listed for
that kind.
| Kind |
When it fires |
Available placeholders |
Deposit completed
depositCompleted |
After a player's deposit invoice completes |
{{amount}} {{currency}} |
Payout completed
payoutCompleted |
After a player's payout completes |
{{amount}} {{currency}} |
Level up
levelUp |
When experience gain moves a player to another level |
{{levelName}} |
Tournament prize awarded
tournamentPrizeAwarded |
When finished-tournament prizes are awarded |
{{tournamentName}} {{rank}} |
Expiry confiscation notice
expiryConfiscationNotice |
When the balance-expiry notice process contacts affected players |
{{currency}} |
Rendering happens at delivery
Both title and message are rendered by replacing tokens such as {{amount}}. The rendered values
are saved on the player's record, so later template edits do not rewrite notifications already delivered.
Missing or inactive template
If the selected kind has no active template, the worker creates no player notification. Archiving a system
template therefore disables future delivery for that kind without disabling the underlying platform event.
🧩
Use only the supported placeholders
The Admin form shows the valid tokens for the selected kind. Unknown or misspelled tokens are left unchanged
and can appear literally to players.
5 Content and player behavior
Shared content fields
Required: title and message.
Optional: expiration, image, CTA text and CTA link. The Admin image control requires at least
282 × 110 px. A CTA can open an internal Swivel path or an external URL; if CTA text is omitted, the player
UI uses its default “Learn more” label.
What the player sees
A live delivery updates the unread count and displays a four-second toast. Opening the notification drawer
loads newest-first cards with the message, optional image and CTA.
Players can mark one or all notifications as read, and delete one or all. Deletion is soft deletion of that
player's record, not deletion of the shared template.
CRM copy remains linked
CRM deliveries use the shared template title and text when read. Editing that CRM copy can therefore change
the text shown on existing, non-expired player notifications.
System copy is a snapshot
System deliveries store their rendered title and message. Template edits affect only future events; existing
player notifications keep the wording and values rendered at delivery time.
6 Setup checklists
For a CRM campaign
- Create and proofread the CRM notification in Admin.
- Set expiration relative to delivery, or leave it unlimited.
- Wait for the resource to be available in the configured CRM.
- Reference the correct template or notification ID in the campaign.
- Test with one player before expanding the audience.
- Stop the campaign before archiving a resource in active use.
For a platform event
- Select an unused system kind in Admin.
- Use only the placeholders offered for that kind.
- Check grammar with realistic values in every token.
- Configure optional expiration, image and CTA.
- Keep the template active to allow event delivery.
- Trigger the event with a test player and verify the drawer.
7 API map
These are the backend route groups used by the Admin and player applications.
Admin · /notifications
GET/List and filter
GET/system/unused-kindsAvailable kinds
POST/crmCreate CRM resource
PATCH/crm/:idEdit or archive CRM
POST/systemCreate system template
PATCH/system/:idEdit or archive system
Player · /user-notifications
GET/Active notifications
PATCH/:idMark one as read
PATCH/Mark all as read
DELETE/:idDelete one
DELETE/Delete all