In Salesforce Chatter is a great way to boost collaboration in your organization. The user can Post Status, Links, Files, and comments on others post. We can also add any number of users in Chatter group. Chatter can email you every time someone follows you, posts to your profile or groups, etc. You can also receive daily or weekly Chatter group email digests for the group you are a member of as well as a Personal digest (It contains posts from your feed and up to 3 comments per post). To receive Chatter email notification and digests System administrator has to enable email notifications for your organization. By default Personal digest is set to Daily and New Chatter groups I join Digest is set to None for new users.
Business Use case
Tamara McCleary is working as a System administrator at Universal Containers (UC). She has received a requirement to auto update new user’s Chatter email settings as mentioned below
- Frequency for personal digest: – Weekly
- Default frequency for groups I join: Email on each post
Solution for the above business requirement
There are multiple solutions possible for the above business scenario. You can either use Apex trigger, a combination of Flow and Process Builder, and few more. We will use Process Builder to solve the above business requirement. Before proceeding you have to understand User objects in Salesforce.
A) DefaultGroupNotificationFrequency: – This field represents the default frequency for sending the user’s Chatter group email notifications when the user joins groups.
B) DigestFrequency: – This field represents the frequency at which the system sends the user’s Chatter personal email digest.
Possible options for Notification Frequency are
–> Daily Digests
–> Weekly Digests
–> Email On each post
–> Never
Follow the below instructions to create a Process for the above business requirement
1. Click on Name | Setup | App Setup | Create | Workflows & Approvals | Process Builder
2. To create a new process from scratch, click on the New Button available on Process Management page, A popup will open where you have to enter Name (Enter Update Chatter Email Notification as name), API Name and Description as shown in the below screenshot
3. Once you click on the Save button, it will redirect you to Process canvas. Click on Object node to add object, select User object, in this case, and set the evaluation criteria, Please refer to the following screenshot for more details
4. The next step is to define Process criteria. For this click on Add Criteria node, Enter Criteria Name, Set filter conditions (Similar to Rule Criteria in WFR), as shown in the following screenshot
5. Now we have to add an Immediate action into the Process to update the user record. For this use Update Records action, Use Field Picker to select the field Description and Text Entry field to enter a comment or sentence. Click on the User object as shown in the following screenshot to select the object
Then select the fields Default Notification Frequency when Joining Groups and Chatter Email Highlights Frequency fields, Choose the frequency as shown in the following screenshot
6. Finally, the Process will look like the following screenshot, clicking on the Activate button.
It’s time to test this Process
Now onwards if the system administrator creates a new user, Process builder will automatically update their Chatter email notification frequency, as shown in the following screenshot
Likewise, you can update other preferences for Chatter email notification for new or existing users.
8 thoughts on “Getting Started with Process Builder – Part 4 (Auto update Chatter email settings)”
Pingback: Getting Started with Process Builder – Part 46 (Deploy Process Using the Force.com IDE) « Rakesh Gupta's Blog
Victor Almeida
Is there any way to access the DefaultGroupNotificationFrequency and DigestFrequency fields via the UI, say when editing the User record? Seems like these should be standard fields that an admin should be able to set on a user’s behalf without needing a workflow.
By the way, thank you so much for all of these examples! I am working my way through all of them.
Rakesh Gupta
Use Log-in as feature
Sandeep
Will it work for groups?
Sandeep
Its working
Rakesh Gupta
Great!
Chris
Thanks for this. My first Process. Now I have to wait till I create a new user to see if it works!
Rakesh Gupta
Awesome 🙂 Glad to know that! Please let me know let me know if it works!