With Summer 19, came an awesome new feature called Notification builder. But, with a weird limitation!
So, for instance, if we were to send custom notifications via a flow instead of a process builder or when you want to publish it via Rest API, we need to input the ID of the Custom Notification Type that we created. So how do we get the ID?
- By navigating your way through Setup to the Custom Notification Type? Well, you can try you won’t find it.
- Wait wait, what about SOQL/Apex? Aww… sorry, the object is not API accessible 😦
Shocker right! But what now?
Well, forcePanda to the rescue! 😀
So first, I would want you to upvote these two ideas to make our lives easier.
Now let’s discuss 3 ways you can find the the ID of Custom Notification Types
1. Developer Console
– Click on the Gear icon in the top right corner and click on ‘Developer Console’ to open it.
– In the bottom panel, click on Query Editor tab and check the “Use Tooling API” checkbox, and execute the following query:
Select Id,CustomNotifTypeName from CustomNotificationType
2. Process Builder
Go to Setup -> Process Builder. Create a dummy process. In the actions, select ‘Send Custom Notification’ and follow these screenshots.
CustomNotificationType sObject is accessible via Tooling API. So we can do a query on Tooling API(very similar to what we did in Dev Console) . So for this, go to workbench.developerforce.com.
– Under ‘Utilities’ select Rest Explorer.
– Set Method to GET, and execute this URL:
There you have your sneaky little ID! 😀
Thank you for being an awesome reader! Subscribe to this blog for all the updates delivered straight to your inbox. 🙂