Send custom notifications to recipients via desktop or mobile channels.
Before you send a custom notification, you must first create a notification type.
In orgs created in Winter ‘21 or later, the Send Custom Notifications user permission is required to trigger the Send Custom Notification action in flows that run in user context, REST API calls, and Apex callouts.
The Send Custom Notifications user permission isn’t required to trigger the Send Custom Notification action in processes or flows that run in system context.
Important
This object is available in API version 46.0 and later.
Optional. Action group for custom notification type. This makes the mobile push notifications actionable.
customNotifTypeId
reference
Required. The ID of the Custom Notification Type being used for the notification.
recipientIds
reference
Required. The ID of the recipient or recipient type. Valid values are: UserId (sent to this user if active), AccountId (sent to all active Account Team members; requires account teams enabled), OpportunityId (sent to all active Opportunity Team members; requires team selling enabled), GroupId (sent to all active group members), or QueueId (sent to all active queue members). Values can be combined in a list up to 500 values.
senderId
reference
Optional. The User ID of the sender of the notification.
title
string
Required. The title of the notification, as seen by recipients. Maximum characters: 250. The content of mobile push notifications depends on the content push notification setting.
body
string
Required. The body of the notification, as seen by recipients. Maximum characters: 750. The content of mobile push notifications depends on the content push notification setting.
targetId
reference
Optional. The Record ID for the target record of the notification. You must specify either a targetID or a targetPageRef.
targetPageRef
string
Optional. The PageReference for the navigation target of the notification. To see how to specify the target using JSON, see pageReference. You must specify either a targetID or a targetPageRef.
Usage
GET
The following example shows how to get information about the custom notification action type: