Appearance
Notifications ​
Overview ​
The backend notifies people in four ways:
- Announcements: workspace admins write announcements (
Announcements) for admins, portal users or DAM groups. They show in an in-app list with unread badges and are emailed. - System notifications: activity in the DAM (uploads, new versions, trash and archive, collage changes, portal invites) is turned into emails and in-app entries by
SendDamEmailSystemNotificationJob, gated by per-workspace and per-user settings. - Real-time events: Laravel broadcasting on private channels pushes badge counts and announcement updates to open browser tabs. The broadcaster comes from
BROADCAST_DRIVER(config/broadcasting.phpdefinespusher,ably,redis,log,null). Channel auth runs throughBroadcast::routes(['middleware' => ['auth:api,dam-api']]), and each channel inroutes/channels.phpis pinned to theapiordam-apiguard. - Push notifications:
App\PushNotification\PushNotificationposts to the Firebase Cloud Messaging legacy endpoint (https://fcm.googleapis.com/fcm/send) for the device tokens indevice_token.
Admin API (/api/v1/announcement/*, /api/v1/digital-assets/notification/*) manages and reads both. Portal API (/dam/v1/digital/announcement/*, /alert/*) reads announcements and order alerts for partners.
Endpoints ​
Admin API (/api/v1) ​
| Method | Path | Controller@method | Purpose |
|---|---|---|---|
| GET | /announcement/users | AnnouncementController@getAnnouncementUsers | Recipients to pick from |
| POST | /announcement/add | AnnouncementController@addNewAnnouncement | Create (draft, scheduled or immediate) |
| POST | /announcement/list | AnnouncementController@listAllAnnouncement | List announcements |
| POST | /announcement/update | AnnouncementController@updateAnnouncement | Edit |
| GET | /announcement/delete | AnnouncementController@deleteAnnouncement | DELETE |
| GET | /announcement/notification-list | AnnouncementController@getUserAnnouncementNotificationList | The user's announcement inbox |
| POST | /announcement/read-unread, /announcement/read, /announcement/mark-all-read | AnnouncementController@readUnreadAnnouncement, @readAnnouncement, @markAllReadAnnouncement | Read state |
| GET | /user-badges-count | Auth\AuthController@getUserNotificationBadgesCount | Unread badge counts |
| GET | /digital-assets/notification/organization-list | DamNotificationController@getOrganizationNotificationList | Workspace notification settings |
| POST | /digital-assets/notification/pause-workspace-notification | DamNotificationController@updateWorkSpacePauseNotificationStatus | Turn all DAM notifications on or off (dam_notification) |
| POST | /digital-assets/notification/set-organization-profile-notification | DamNotificationController@setOrganizationProfileNotificationStatus | Per-type email / in-app switch for the workspace |
| GET POST | /digital-assets/notification/user-notification-list, /set-user-profile-notification | DamNotificationController@getUserProfileNotificationList, @setUserNotificationStatus | Per-user preferences |
| GET | /digital-assets/notification/system-notification-list | DamNotificationController@getSystemNotificationList | In-app activity feed |
| POST | /digital-assets/notification/read-unread-system-notification, /mark-all-read-unread-notification | DamNotificationController@readUnreadSystemNotification, @markAllReadUnreadSystemNotifications | Read state (read_at) |
Portal API (/dam/v1/digital) ​
| Method | Path | Controller@method | Purpose |
|---|---|---|---|
| GET | /announcement/notification-list | AnnouncementController@getAnnouncementNotificationList | Partner announcement inbox |
| POST | /announcement/read-unread, /announcement/read | AnnouncementController@readUnreadAnnouncement, @readAnnouncement | Read state |
| GET | /announcement/mark-all-read, /announcement/user-badges-count | AnnouncementController@markAllReadAnnouncement, @getUserNotificationBadgesCount | Read all, badge count |
| GET | /alert/order-status | NotificationController@statusAlert | Order status alerts |
| POST | /alert/dismiss | NotificationController@dismissAlert | Dismiss an alert |
Broadcast channels (routes/channels.php) ​
| Channel | Event (broadcastAs) | Sent by |
|---|---|---|
user.{user_id}.projectBatchNotification | ProjectUserNotificationBadgesEvent | Announcement and system notification jobs, for admins |
user.{user_id}.DAMFrontendAnnouncementNotification | DAMFrontendAnnouncement | Announcement job, for portal users |
user.{user_id}.getUserSubscriptionChannel | GetUserSubscriptionEvent | DAMExistingUserApplyProPlan command |
logoutDealershipUser.{user_id} | LogoutDealershipUser | Defined; no dispatch in this snapshot |
user.{id}, App.User.{id} | PrivateEvent | Defined; no dispatch in this snapshot |
Each channel callback only lets the user whose id is in the channel name subscribe. Both badge events implement ShouldBroadcastNow, so they are sent inside the job, not queued again.
Workflows ​
Publish an announcement ​
publish:scheduled_announcements runs daily at 13:30 and dispatches the same job for every scheduled, non-draft announcement whose publish_date is today.
Two date fields describe when a post goes out:
| Field | Meaning | Set by |
|---|---|---|
publish_date | Calendar day the post is promised for. No time, no zone, so every viewer sees the same day. | The request (publish_date) |
published_at | Instant the post went live, serialised as UTC ISO so each viewer sees it in their own zone. null for drafts and schedules that have not run. | addNewAnnouncement: now() when not draft and not scheduled, else null. updateAnnouncement: published keeps the existing value (or now()), draft or scheduled clears it. The 13:30 command: now() when it releases a scheduled post. |
Before this field, a "publish now" post made in the evening in the US carried the next day's IST date. Collage Admin's announcements list now shows publish_date for scheduled posts and published_at (falling back to created_at, then publish_date) for published ones. The endpoint does not call checkUser; it only runs inside checkUserWithWS.
Deliver an announcement ​
Admins get the badge event and an email; portal users get the frontend event, a push notification and an email. Push uses the user's device_token rows and sends silently (no sound, normal priority) when the user muted the module in mute_notifications. Email branding comes from DamInstance::checkMailBranding().
System notification email and feed ​
The job sets the workspace mail context first, so white-label workspaces send from their own mail settings. The acting user is excluded. upload-new-asset-folder never sends email, only the in-app entry. The in-app path also requires the public_and_private_asset_customisation plan feature. Slugs used in this guide: upload-new-asset-folder, add-new-version-of-asset, delete-or-archive-asset-folder, new-collection-created, remove-collection, add-new-asset-in-collection, remove-asset-in-collection. New users get default DamUserNotifications rows from AddDamNotificationJob.
Read state and badges ​
System notifications use read_at on DamSystemNotifications; mark-all-read-unread-notification can limit the update to a list of workspaces. NotificationCountUpdate runs daily at 06:40 and updates unread counts for notifications older than 30 days.
Data ​
| Model / table | Use |
|---|---|
Announcements, AnnouncementUsers | Announcements and explicit recipients |
AnnouncementSystmNotifications | Per-user announcement inbox (read_at) |
ProjectUserNotificationBadges | Badge counters per user and user_type |
DamNotification / dam_notifications | Notification types per workspace (is_email, is_system, recipients) |
DamUserNotifications / dam_user_notifications | Per-user preferences |
DamSystemNotifications / dam_system_notifications | In-app activity feed |
DeviceToken / device_token, MuteNotifications | Push tokens and mute settings |
Workspace.dam_notification | Workspace-wide pause |
Related ​
- Events, Jobs, Mail
- Assets, Folders, Collages, Portals for the actions that notify
- Frontend: Notifications & Announcements, Real-time Updates