How do administrators configure Custom Notifications to alert users via automated Flow actions?
Answer
Basics: Custom notifications appear in the bell icon in Lightning Experience and as push alerts in the Salesforce mobile app. They are for telling people something needs attention (a high-priority case escalated, an approval waiting) without relying on email.
How it works:
- Setup > Notification Builder > Custom Notifications > New. Name it and tick the channels: Desktop (Lightning Experience bell) and/or Mobile (push).
- In Flow Builder add an Action element and choose "Send Custom Notification".
- Fill the inputs: Custom Notification Type ID (look it up with a Get Records on CustomNotificationType by DeveloperName), Recipient IDs (a collection of user IDs, or a single group, queue or owner ID), Notification Title, Notification Body, and a Target (Target Record ID or a page reference).
- Optionally add a Sender ID.
- Place it in a record-triggered, scheduled or screen flow.
Advanced / deep dive: Recipients can be users, public groups, queues, or a record's owner, and flow logic can build a collection with Assignment elements. Clicking the notification navigates to the target record or page. Notifications are delivered per recipient, so avoid sending them to huge audiences in a loop (limits apply, verify the current hourly org limit in documentation). Apex gives the same capability for bulk or complex logic. Notifications do not replace email for audit or reliability since users can disable them, and Classic does not show them. Use a Notification Type per business scenario so users can control preferences and so you can report on usage.
Code / config example:
// Bulk-safe send: one notification to a set of recipients
CustomNotificationType nt [SELECT Id FROM CustomNotificationType
LIMIT ];
Messaging. .CustomNotification();
n.setNotificationTypeId(nt.Id);
n.setTitle();
n.setBody( + c.CaseNumber + );
n.setTargetId(c.Id);
n.send( <String>{ c.OwnerId });