Custom Notification
A Custom Notification in Salesforce is an admin-defined push notification that can be sent to specific users through the Salesforce mobile app, the desktop bell icon, or both.
Definition
A Custom Notification in Salesforce is an admin-defined push notification that can be sent to specific users through the Salesforce mobile app, the desktop bell icon, or both. Notifications are triggered programmatically from Flow, Process Builder, Apex, or the REST API, and let admins build domain-specific alerts (High-value Opportunity at risk, VIP customer just submitted a Case, SLA breach imminent) without writing custom mobile push integration code.
Custom Notifications are configured through the Custom Notification Type standard object (CustomNotificationType in the API), which holds the MasterLabel, CustomNotifTypeName, Description, and channel toggles (Desktop, Mobile). Once a type is defined, automations reference it by Id and supply a Title, Body, optional Sender Id and TargetId (the record the notification is about), and a list of recipient User Ids. Salesforce delivers the notification across the configured channels to each recipient.
How Custom Notifications work in Salesforce
The Custom Notification Type object
CustomNotificationType is a standard object that defines a category of notifications. Each row holds the MasterLabel (display name), CustomNotifTypeName (API name), Description, and two boolean channel toggles for Desktop (the bell icon in Lightning) and Mobile (the Salesforce mobile app push). Admins create types in Setup, Custom Notifications.
Sending a notification from Flow
The Send Custom Notification Flow action takes the Custom Notification Type, a Title, a Body, recipient User Ids, an optional Sender Id, and an optional TargetId pointing at a record. When the Flow runs, Salesforce delivers the notification through the channels enabled on the Type. Recipients see the notification appear in the bell or push to their mobile device.
Sending from Apex
The Apex Messaging.CustomNotification class lets developers send notifications programmatically. Set TypeId, Title, Body, Sender Id, TargetId, then call send on a set of User Ids. The Apex path is necessary for use cases that need richer logic than Flow can express (multi-criteria evaluation, dynamic recipient lists from a SOQL query).
Mobile and Desktop delivery
The Mobile channel delivers a push notification to the Salesforce mobile app on iOS and Android. The Desktop channel delivers a notification to the bell icon in Lightning. Notifications include the Title, Body, an icon, and (if TargetId is set) a tap-to-open link to the record. Recipients without the mobile app installed do not receive the push but still see the desktop bell notification.
Common automation patterns
The typical use cases are SLA-related (Case still open after 4 hours), pipeline-related (Opportunity stage advanced to Proposal), risk-related (Opportunity at 80 percent probability with no recent activity), VIP-related (Customer flagged VIP creates a Case), and approval-related (Custom approval workflow finished, recipient should review).
Limits and considerations
Custom Notifications are limited to 500 recipients per send and 1 million notifications per org per day. Mobile push delivery is best-effort; offline devices receive the notification when they reconnect. Notifications without a TargetId still deliver but lack the tap-to-open link. The notification body is plain text, not HTML.
Custom Notifications vs Email Alerts
Email Alerts are the older notification mechanism: send an email through a Process or Flow. Custom Notifications are the modern in-app alternative: push to the bell or mobile. Use Email for messages that need archival, audit trail, or external delivery; use Custom Notifications for time-sensitive in-app alerts.
How to set up and send Custom Notifications
Setup is a one-time Custom Notification Type definition. Ongoing use is just Flow actions or Apex sends that reference the type.
- Define the Custom Notification Type
Setup, Custom Notifications, New. Name it (for example, Sales SLA Alert). Enable Mobile or Desktop channels (or both). Save.
- Build the trigger
Decide what should trigger the notification (record update, scheduled job, external event). Build a record-triggered Flow, schedule-triggered Flow, or Apex trigger.
- Send the notification from Flow
Use the Send Custom Notification action. Pick the Type. Set the Title, Body, Recipient User Ids (single or collection), optional Sender Id, and optional TargetId.
- Test in sandbox
Trigger the source event. Verify the notification arrives at the bell and mobile push. Verify the tap-to-open link routes to the right record.
- Monitor delivery
Custom Notifications do not have a delivery log out of the box. Build a custom log object that captures send attempts for audit, or rely on Apex try-catch reporting for failures.
- Iterate
Tune the trigger logic and the notification copy based on agent feedback. Too many notifications cause alert fatigue; too few miss critical events.
- Notifications are limited to 500 recipients per send. For broader audiences, split into multiple sends.
- Without a TargetId, recipients cannot tap to open a record. Always set TargetId when relevant.
- Mobile push delivery requires the Salesforce mobile app installed and notification permission granted on the device. Some users have not granted both.
- Notification body is plain text. No links, no formatting, no images. Plan the copy accordingly.
- Custom Notifications are not subject to user notification preferences. They always send to the recipient User Ids you specify.
Trust & references
Cross-checked against the following references.
- Create Custom NotificationsSalesforce Help
- Messaging.CustomNotification Apex ClassSalesforce Developers
Straight from the source - Salesforce's reference material on Custom Notification.
- CustomNotificationType Object ReferenceSalesforce Developers
- Notification Builder OverviewSalesforce Help
Hands-on resources to go deeper on Custom Notification.
About the Author
Dipojjal Chakrabarti is a B2C Solution Architect with 29 Salesforce certifications and over 13 years in the Salesforce ecosystem. He runs salesforcedictionary.com to help admins, developers, architects, and cert/interview candidates sharpen their fundamentals. More about Dipojjal.
Discussion
Loading discussion…