Custom Notification Actions
Before you send a custom notification, you must first create a notification type.
This object is available in API version 46.0 and later.
Supported REST HTTP Methods
- URI
- /services/data/vXX.X/actions/standard/customNotificationAction
- Formats
- JSON, XML
- HTTP Methods
- GET, HEAD, POST
- Authentication
- Authorization: Bearer token
Inputs
Input | Details |
---|---|
customNotifTypeId |
|
recipientIds |
|
senderId |
|
title |
|
body |
|
targetId |
You must specify either a targetID or a targetPageRef. |
targetPageRef |
You must specify either a targetID or a targetPageRef. |
Usage
GET
curl --include --request GET \
--header "Authorization: Authorization: Bearer 00DR...xyz" \
--header "Content-Type: application/json" \
"https://instance.salesforce.com/services/data/v46.0/actions/standard/customNotificationAction"
POST
curl --include --request POST \
--header "Authorization: Authorization: Bearer 00DR...xyz" \
--header "Content-Type: application/json" \
--data '{ "inputs" :
[
{
"customNotifTypeId" : "0MLR0000000008eOAA",
"recipientIds" : ["005R0000000LSqtIAG"],
"title" : "Custom Notification",
"body" : "This is a custom notification.",
"targetId" : "001R0000003fSUDIA2"
}
]
}' \
"https://instance.salesforce.com/services/data/v46.0/actions/standard/customNotificationAction"
[
{
"actionName" : "customNotificationAction",
"errors" : null,
"isSuccess" : true,
"outputValues" : {
"SuccessMessage" : "Your custom notification is processed successfully."
}
}
]