In my last post I have told you How to Send Push Notification in the Salesforce Desktop and Mobile App, So today I will tell you how you can get the ID of Custom Notification Type in Salesforce.
With Summer ‘19 release new feature in Salesforce called ‘Notification Builder’ is now finally available. But with some limitation!
So, if we want to send notification via flow instead of process builder or when we want to publish it with Rest API then we need to input ID of Custom Notification Type. So how we get to know the ID?
- By navigating your way through Setup to the Custom Notification Type? Well, you can try you won’t find it.
- The object was not API accessible, before Summer’19 release. So it is not possible to do SOQL query/Apex.
Let us have a walkthrough how to get ID of Custom Notification Type.
There are 3 ways you can find the ID of Custom Notification Type.
1. Developer Console:
Click on the gear icon on the top right corner and open ‘Developer Console’ and SOQL Query.
Select Id,CustomNotifTypeName from CustomNotificationType
2. Process Builder
In this step, we will create a Process Builder and select action ‘Send Custom Notification’ and follow these steps.
- Go to Setup → Process Builder → Create new
- Select your object, and if this should fire only on create or create and edit
- Add the Criteria you want
- Create New Action → select ‘Send Custom Notification’
- Enter the name of Action
- Select the Notification Recipient it can be Owner, User, Group, Queue, totally up to you.
- Enter the Notification Title and Notification Body
- Activate the Process Builder.
3. Workbench:
In Summer’19 release CustomNotificationType is accessible as
– Go to the Workbench( Tooling API )- https://workbench.developerforce.com
– Select Rest Explorer under ‘Utilities’.
– Then select Method to GET, and execute the below URL:
/services/data/v45.0/tooling/query/?q=SELECT+id,CustomNotifTypeName+from+CustomNotificationType
In addition, learn how to use Send Push Notification in Salesforce Desktop and Mobile App to create and send push notification.
Moreover, If you have any suggestions or issue with the post, you can reply in the comment box.
Support: Thank you for being an awesome reader! For any further Salesforce support/ customisations, Chat with us
Recent Comments