Big Idea or Enduring Question:
A warm welcome goes a long way in solidifying a company’s culture! If so then, why not provide existing users an ability to auto-follow new users in chatter?
Chatter is a great way to boost collaboration in your organization. You can Post Status, Links, Files, and Comments on others’ posts, etc. The benefits of following the new users in Chatter are the following:
- Keep up with what new users are doing; your guidance will expedite, and streamline their on-boarding journey!
- Following new users will enable you to track their chatter activities; use this ‘crystal ball’ to help them to improve their productivity!
In the past, I have written a few articles related to User, Chatter, and automation. Why not check them out while you are at it?!
-
- Getting Started with Salesforce Flow – Part 26 (Automatically Add a Record to Chatter Group)
- Getting Started with Salesforce Flow – Part 37 (Auto Remove Followers From Closed Opportunity)
- Getting Started with Salesforce Flow – Part 36 (Automatically Add New Users to a Chatter Group)
- Getting Started with Salesforce Flow – Part 30 (Reminder Email to Upload Chatter Profile Photo)
On the Trailblazer community, several people have been wondering how to allow their users to auto-follow new users. Salesforce doesn’t have any out-of-the-box feature for this; so, I decided to take a crack at it. This article shows how to develop an app that allows your users to auto-follow news users without code.
Objectives:
After reading this blog post, the reader will be able to:
- What is a MIXED DML error and how to avoid it?
- Add a Time-dependent action in After-save Record-Triggered Flow
- Get the list of user who has opted to follow new users in Chatter
- Use a Loop element to work with multiple records
- Use After-save Record-Triggered Flow to create a record (Bulk Safe)
- Monitor Time-based flow queue
Business Use Case
Warren Mason, Gurukul on Cloud‘s (GoC) awesome System Administrator, received the following requirement – allow users to auto-follow new users in Chatter. And, make this an optional feature.
Automation Champion Approach (I-do):
While this can be solved using various automation tools like Apex, etc, but we’ll use After-save Record-Triggered Flow to solve it. Check out this article to understand why we are using after-save record-triggered flow for this scenario.
Before proceeding ahead, you have to understand the EntitySubscription object. The object represents a user‘s subscription – whether the user follows a record or other users.
Field Name | Details |
SubscriberId | The Id of the User who is following the record or user. |
ParentId | The Id of the record or user which the user is following. |
Before discussing the solution, 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 2 steps to solve Warren’s business requirement using After-save Record-Triggered Flow. We must: Read the rest of this entry!