Skip to content

Notifications ​

Overview ​

The backend notifies people in four ways:

  1. 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.
  2. 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.
  3. 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.php defines pusher, ably, redis, log, null). Channel auth runs through Broadcast::routes(['middleware' => ['auth:api,dam-api']]), and each channel in routes/channels.php is pinned to the api or dam-api guard.
  4. Push notifications: App\PushNotification\PushNotification posts to the Firebase Cloud Messaging legacy endpoint (https://fcm.googleapis.com/fcm/send) for the device tokens in device_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) ​

MethodPathController@methodPurpose
GET/announcement/usersAnnouncementController@getAnnouncementUsersRecipients to pick from
POST/announcement/addAnnouncementController@addNewAnnouncementCreate (draft, scheduled or immediate)
POST/announcement/listAnnouncementController@listAllAnnouncementList announcements
POST/announcement/updateAnnouncementController@updateAnnouncementEdit
GET/announcement/deleteAnnouncementController@deleteAnnouncementDELETE
GET/announcement/notification-listAnnouncementController@getUserAnnouncementNotificationListThe user's announcement inbox
POST/announcement/read-unread, /announcement/read, /announcement/mark-all-readAnnouncementController@readUnreadAnnouncement, @readAnnouncement, @markAllReadAnnouncementRead state
GET/user-badges-countAuth\AuthController@getUserNotificationBadgesCountUnread badge counts
GET/digital-assets/notification/organization-listDamNotificationController@getOrganizationNotificationListWorkspace notification settings
POST/digital-assets/notification/pause-workspace-notificationDamNotificationController@updateWorkSpacePauseNotificationStatusTurn all DAM notifications on or off (dam_notification)
POST/digital-assets/notification/set-organization-profile-notificationDamNotificationController@setOrganizationProfileNotificationStatusPer-type email / in-app switch for the workspace
GET POST/digital-assets/notification/user-notification-list, /set-user-profile-notificationDamNotificationController@getUserProfileNotificationList, @setUserNotificationStatusPer-user preferences
GET/digital-assets/notification/system-notification-listDamNotificationController@getSystemNotificationListIn-app activity feed
POST/digital-assets/notification/read-unread-system-notification, /mark-all-read-unread-notificationDamNotificationController@readUnreadSystemNotification, @markAllReadUnreadSystemNotificationsRead state (read_at)

Portal API (/dam/v1/digital) ​

MethodPathController@methodPurpose
GET/announcement/notification-listAnnouncementController@getAnnouncementNotificationListPartner announcement inbox
POST/announcement/read-unread, /announcement/readAnnouncementController@readUnreadAnnouncement, @readAnnouncementRead state
GET/announcement/mark-all-read, /announcement/user-badges-countAnnouncementController@markAllReadAnnouncement, @getUserNotificationBadgesCountRead all, badge count
GET/alert/order-statusNotificationController@statusAlertOrder status alerts
POST/alert/dismissNotificationController@dismissAlertDismiss an alert

Broadcast channels (routes/channels.php) ​

ChannelEvent (broadcastAs)Sent by
user.{user_id}.projectBatchNotificationProjectUserNotificationBadgesEventAnnouncement and system notification jobs, for admins
user.{user_id}.DAMFrontendAnnouncementNotificationDAMFrontendAnnouncementAnnouncement job, for portal users
user.{user_id}.getUserSubscriptionChannelGetUserSubscriptionEventDAMExistingUserApplyProPlan command
logoutDealershipUser.{user_id}LogoutDealershipUserDefined; no dispatch in this snapshot
user.{id}, App.User.{id}PrivateEventDefined; 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:

FieldMeaningSet by
publish_dateCalendar day the post is promised for. No time, no zone, so every viewer sees the same day.The request (publish_date)
published_atInstant 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 / tableUse
Announcements, AnnouncementUsersAnnouncements and explicit recipients
AnnouncementSystmNotificationsPer-user announcement inbox (read_at)
ProjectUserNotificationBadgesBadge counters per user and user_type
DamNotification / dam_notificationsNotification types per workspace (is_email, is_system, recipients)
DamUserNotifications / dam_user_notificationsPer-user preferences
DamSystemNotifications / dam_system_notificationsIn-app activity feed
DeviceToken / device_token, MuteNotificationsPush tokens and mute settings
Workspace.dam_notificationWorkspace-wide pause