Getting Started with Process Builder – Part 4 (Auto update Chatter email settings)

Getting Started with Process Builder – Part 4 (Auto update Chatter email settings)

Last Updated on December 15, 2020 by Rakesh Gupta

Big Idea or Enduring Question:

Chatter is a great way to boost collaboration in your organization. Users can post a status, links, files, and comments on other’s posts. We can also add users to chatter groups. Chatter can email you every time someone follows you, posts to your profile or groups, etc. To learn more about chatter and find out how to get started, please check out Trailhead

Chatter becomes even more powerful through automation. We can make changes to records and settings in an automatic fashion that reduces human error. In this tutorial, we’ll see the power of the process builder when combined with Chatter.

Objectives:

After reading this blog, you’ll be able to: 

  • Get a better understanding of Chatter
  • Use Process Builder to update Chatter email settings
  • Realize what’s possible with Chatter and Process Builder

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 when they’re onboarded. The requirements are below.

  1. Update the personal digest frequency: – Weekly
  2. Update the default email frequency for groups I join: Email on each post

Automation Champion Approach (I-do):

Multiple approaches can be taken to solve this business requirement. Either a process builder or Flow and an Inline Visualforce Page or other approaches can be taken. In this case, Process Builder is being used to solve this requirement.

Before proceeding you have to understand the User object and some of its fields in Salesforce.

A) DefaultGroupNotificationFrequency: – This field represents the default frequency for sending the user’s Chatter group email notifications when the user joins groups.

The options are as follows:

  • Email on every post
  • Daily digests
  • Weekly digests
  • Limited

B) DigestFrequency: – This field represents the frequency at which the system sends the user’s Chatter personal email digest.

The options for DigestFrequency are as follows:

  • Daily
  • Weekly
  • Never

Before discussing it, let me show you a diagram of a Process Flow at a high level. Please spend a few minutes to go through the following Flow diagram and understand it.

Let’s begin building this automation process.

Guided Practice (We-do):

There are 4 steps to solve Tamara’s business requirement using Process Builder. We must: 

  1. Define process properties
  2. Define evaluation criteria
  3. Define process criteria
  4. Add action – update records

Step 1: Define Process Properties

  1. Click Setup.
  2. In the Quick Find box, type Process Builder.
  3. Select Process Builder, then click New.
  4. Name the Process and click the Tab button. The API Name will populate. 
  5. As a best practice, always input a description
  6. The process starts when A record changes.
  7. Click Save.

Step 2: Define Evaluation Criteria

  1. Click on the Add Object node to begin selecting the evaluation criteria.
  2. Select the User object from the dropdown list.
  3. Start the process only when a record is created.
  4. Click Save.

Step 3: Define Process Criteria

  1. Click the Add Criteria node to begin defining the process criteria.
  2. Name the criteria.
  3. For Criteria for Executing Action
    1. Select No Criteria – Just execute the actions! 
  4. Click Save.

Step 4: Add Action – Update Record

  1. Below Immediate Actions, click Add Action.
  2. For Action Type, select Update Records
  3. Name the action.
  4. Select the User record type. 
  5. Criteria for Updating Record: No criteria-just update the records! 
  6. Set Field Values:
    1. Row 1:
      1. Field: User | Default Notification Frequency when Joining Groups
      2. Type: Picklist
      3. Value: Email on Each Post
    2. Click Add Row
    3. Row 2:
      1. Field: User | Chatter Email Highlights Frequency
      2. Type: Picklist
      3. Value: Weekly
  7. Click Save.

Almost there! Once everything looks good, click the Activate button. 

Note:- Before you activate your process, you will want to make sure that you have assigned data in the correct format because Process Builder obeys validation rules. If some fields are required by using validation rules, then make sure you have added those fields. Conversely, if some fields are required on the page layout, you can ignore those fields. 

Proof of Concept

Now onwards, if the system administrator creates a new user by going to Setup, typing Users, and clicking New. Fill in the required fields and save the record. If you’re an administrator, log in as the user and check their settings. Otherwise, have the user log in and check their settings.  

Now it’s your turn to try something with Process Builder and Chatter. There are lots of options. Try to post to a group to let everyone know a new user has been added or post directly to the person’s manager. Come up with your own Process with Chatter and let us know what you’ve done.

Formative Assessment:

I want to hear from you!  

What is one thing you learned from this post? How do you envision applying this new knowledge in the real world? 

Let me know by Tweeting me at @automationchamp, or find me on LinkedIn.

Author: - Rakesh Gupta
Technical Editor: - Stephen Harrington
Have feedback, suggestions for posts, or need more information about Salesforce online training offered by me? Say hello, and leave a message!

9 thoughts on “Getting Started with Process Builder – Part 4 (Auto update Chatter email settings)

  1. 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.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.