Send Custom Notification using a Process Builder
Similar to sending an Email alert, salesforce provides another way to notify its user in its own platform. Suppose there is a business process where you do not want to send an email,but instead you want to send them a notification on desktop/Mobile. For this, Salesforce has provided a tool which is custom notification.
Custom notification can be automated to send to the intended user/group using process builder, for that you would have to do the following.
- Create a Custom Notification in Salesforce.
- Create a process which sends the notification.
To create a custom notification you have to do the following.
- Click on the Gear icon on the right hand top corner and click on setup
- Type Custom notifications in the quick find box and click on custom notification
- Click on the new button and fill in the information given below.
- Custom Notification Name: Opportunity Closed Lost
- API Name: Opportunity_Closed_Lost
- Desktop: checked
- Mobile: checked
- Click on save
You have now created a custom notification that you can be used in the process builder.
To trigger this notification we now need to create a process builder and define a criteria i.e when to send this notification to the intended user. In our case we would use an existing process builder that we have used to send an email alert.
- Click on the gear icon on the top right hand corner and click on setup.
- Type process builder in the quick find box and click on the process builder.
- Select the previously created process: ‘ Opportunity won’
- Click on clone and enter the description: ‘Custom notification on closed lost’ and click on save. This will make a new version of the existing process and you can activate and deactivate older versions of the process if required.
- Click on the next Criteria node and Define the Criteria with the following details.
- Criteria Name: Opportunity Closed Lost
- Criteria for Executing Actions: Conditions are met
- Set Considitions:
- Field = stage
- Operator = Equals
- Type = Picklist
- Value = Closed Lost
- Select Conditions: All of the conditions are met (AND)
- Click on save.
- After saving the Criteria, click on the immediate action and select Action type:Send Custom Notification
- Enter the following details in the action.
- Action Name: Account Owner Notified
- Notification Type: Opportunity Closed Lost
- Notification Recipient: Owner >[Opportunity].Account.OwnerId
- Notification Title: {![Opportunity].Account.Name}
- Notification Body:
Opportunity with Account {![Opportunity].Account.Name} was closed lost
Amount: {![Opportunity].Amount}
- Target Object: Opportunity Object that started the process.
- Click on save
- Activate the process by clicking on the activate button.
Below are the test result
When an Opportunity is closed lost, the account owner receives a notification.
Below is the Notification body.
For More Examples refer : Automate you Business Process