Salesforce mobile push notifications allow developers or admins to notify their customers/users by sending Salesforce push notifications on their Smartphones, where the features were introduced in the Summer 2019 release. We have different options for sending Salesforce push notifications, Push Notifications, and In-App Notifications. Salesforce Push Notifications Keeps users aware of relevant activity when not using Salesforce for Android or iOS. In-App notifications alert users of activity in Lightning Experience and the Salesforce mobile app. Custom Salesforce push notification supports both Salesforce apps and custom apps.

Implementing Salesforce Mobile Push Notifications

The first step towards sending custom push notifications is creating “Custom Notifications.”

Custom Notifications in Salesforce CRM: Custom Notifications will be displayed on Salesforce mobile or desktop whenever an event occurs. Events can occur on record creation, updates, or upon meeting certain criteria.

Steps to implement Salesforce mobile push notifications:

  1. Go to setup -> search “Custom Notifications” in quick find box -> under “Notification Builder” we can see “Custom Notifications” -> click on “New” -> fill-in the details

Salesforce

  1. Go to Setup -> search “Notification Delivery Setting” in quick find box -> under “Notification Builder” we have “Notification Delivery Setting” -> scroll to “Custom Notification Types” -> click “Edit” on custom notification created in step 1 -> select desired mobile applications -> Save.

Salesforce

  1. Go to Setup -> search “Salesforce Notifications” --> inside Notification setting enable the in-app & push notifications.

Salesforce

Different Ways to Send Push Notifications in Salesforce

  1. Apex : We can use the Custom Notification class to send custom push notifications from the apex code. Please refer to the sample code for sending a custom notification to a recipient list. We can call this code from a trigger, flow, or wherever you want to send a custom notification from Apex.

Also, please refer to the following link to the Apex Reference Guide to learn more about the custom notification class and ways to send push notification in Salesforce.

https://developer.salesforce.com/docs/atlas.en-us.238.0.apexref.meta/apexref/apex_class_Messaging_CustomNotification.htm

Messaging.CustomNotification customNotificationObj = new Messaging.CustomNotification();

 

Id userId = Userinfo.getUserId();

customNotificationObj.setBody('Please check the case details');

customNotificationObj.setTitle('Case got escalated !!');

CustomNotificationType type = [SELECT Id FROM CustomNotificationType WHERE DeveloperName = ‘pushNotification’];

customNotificationObj.setNotificationTypeId(type.id);

customNotificationObj.setSenderId(userId);

customNotificationObj.setTargetId(case.Id);

customNotificationObj.send(new Set<String> {userId});

  1. Flows: Custom notification action is available in the flow builder. We add it to our flow and add the recipient list and content of the notification.

A few tips from Salesforce documentation to implement flow for custom notification

Add the ‘get record’ element to flow and filter it by API Name to get the Notification type ID directly.

Use resources for storing recipient Id. Using the assignment element add values to the collection of the recipient.

Please refer to the following link for more details on flow implementation:

https://help.salesforce.com/s/articleView?id=sf.flow_ref_elements_actions_sendcustomnotification.htm&type=5

  1. Process Builder: We can also implement push notifications using process builders, but Salesforce plans to retire Process Builder and recommends building automation in Flow Builder.

Salesforce

Look and Feel of Push Notifications in Salesforce

The notification receiver should have the Salesforce mobile app installed on the Smartphone. Mobile in-app notifications require the Enable in-app notifications setting. Mobile push notifications depend on a user’s device level and, if available, app-level push notification settings.

  • Custom Push Notification on the Smartphone

Salesforce

  • Custom Notification on desktop

SalesforceSalesforce

Limits & Considerations for Push Notification in Salesforce

Please consider the following limitations and considerations during implementation:

  • Number of Custom Notification types we can create – 500
  • Salesforce org executes 10,000 notification actions per hour
  • 10,000 recipients can be there for Every Notification we have.
  • Please enable Display full content push notifications setting for displaying body and title of notification or else only title will be displayed.
  • The title and body support plain text only.

Please refer to the below link for detailed considerations shared by salesforce.

https://help.salesforce.com/s/articleView?id=sf.notif_builder_considerations.htm&type=5

Summary

We can think of an ‘X’ number of possibilities and use cases for such a feature whenever certain conditions are met. Like a record gets created, the status of a case, an opportunity gets updated, or when you want to send real-time notifications to the user/customer, we can consider doing it through custom push notifications.

We can look at this as a better alternative for sending emails to users and it would be beneficial when users can get the updates on-the-go and get direct access to the record with fewer clicks.

About Jade’s Salesforce Integration Services

Salesforce Consulting Services and Expertise That Assures Business Outcomes

Increase demand, improve overall pipeline, increase selling velocity, improve customer experience, and streamline business processes with Jade’s Salesforce offerings. We will help you receive assured business outcomes through our unique market position:

  • Jade is a premier Salesforce Partner, with more than 250+ global CRM consultants and 600+ certifications.
  • Team includes Salesforce experts, architects, developers, data analysts, and process integration specialists.
  • Proven track record in complex CRM implementation, advisory, integration, and optimization services across the Salesforce CRM, Sales CloudService CloudExperience Cloud, Revenue Cloud, Marketing Cloud, Field Service Lightning Cloud, Mulesoft, and AppExchange solutions.
  • Dedicated customer success manager and program management team for every engagement resulting in 4.9+ CSAT rating out of 5.
  • Additional partnerships with OracleMicrosoft, Copado, Tableau, Mulesoft, and Boomi give us rich integration capabilities with leading ERP, HCM, Integration, Dev Ops, and Analytics solutions.
  • 20+ Industry and Technical Accelerators to implement solutions faster.
  • Industry leading Revenue Cloud capabilities, including Approved Billing Cloud implementation partner.

References

About the Author

profile image

Vitthal Yadav

Senior Technical Analyst , Enterprise Cloud Apps - Salesforce

Vitthal is working with Jade Global as a Senior Technical Analyst. Vitthal is salesforce enthusiast. He has 7+ years of experience on Salesforce Platform working on various salesforce feature like apex programing, Lightning Web Components, Aura Components, API Integrations, Batch Apex , Dataloader etc. Also Worked on Sales & Service clouds.

How Can We Help You?