In Salesforce Chatter Group represent the group of people. It’s a great way to boost collaboration in your organization. You can add unlimited members into Chatter Group, but a user can join maximum of 100 Groups. In this article Post Opportunity details to a Chatter Group, I had discussed how to post Opportunity closed information to a Chatter Group using the Flow and Flow Trigger. In this article, we will discuss how to post a message to the Chatter Group using the Process Builder. Let’s start with a business use case
Business Use case
Brandon Schaefer is working as System administrator at Universal Containers (UC). His organization wants to post a message to the Chatter Group “UC Internal Announcement,” whenever an event is created for the public calendar Universal Container Conference Rooms.
Solution for the above business requirement
To solve the above business requirement, we will use Process Builder. Before proceeding, we have to understand Public Calendar in Salesforce. Public calendars and resources are for managing group activities or shared resources. Using public calendars, a group of people can track events of interest to all of them (such as Sales events, weekly knowledge sharing session, or training classes) or schedule a common activity (such as a team vacation calendar). For example, with resource calendars, multiple people can coordinate their usage of a shared resource such as a conference room, etc. An organization can create an unlimited number of calendars. Our first task is to get the 15 digit record Id of public calendar Universal Container Conference Rooms follow the below instructions
1. Click on Setup | Build | Customize | Activities | Public Calendars and Resources
2. Click on the public calendar Universal Container Conference Rooms and grab the 15 digit record id from the URL, as shown in the following screenshot
3. The next step is to convert the 15 digit Id into 18 digit Id. We will use this as entry criteria in the Process Builder.
Our next task is to create a Process on Event object to post a message to the Chatter group. To create a Process on the Event object follow the below instructions
4. Click on Name | Setup | App Setup | Create | Workflows & Approvals | Process Builder and click on the New button, Enter Name, API Name and click on the Save button, as shown in the following screenshot
5. Click on Add Object, select Event object and for the entry criteria, Select only when a record is created, as shown in the below screenshot and also click on the Save button
6. The next task is to add Process Criteria, To do this click on Add Criteria, enter Name, Type of action and set filter conditions (In this case set [Event].OwnerId Equals 023B00000012HLlIAM and click on the Save button, as shown in the following screenshot
7. Our final task is to add an Immediate action to the Process. Click on Add Action (Under Immediate actions) and select the type of action to create (In our case Post to Chatter), enter the Name Post to Chatter. This action allows you to post a message on User Profile or Chatter Group or on Record Chatter Feed. In this case, select Chatter Group UC Internal Announcement, as shown in the following screenshot
The next step is to add a message to the Chatter post, for this you can use message TextBox. It also allows you to add fields from the object on which you have created the Process Builder, as shown in the following screenshot
It also allows you to add the existing Topics into the Chatter post. For this, you can enter the Topic name in the TextBox Add Topics and select the topic you want to include in the Chatter post as shown in the following screenshot
Finally, Post to Chatter action will look like the following screenshot
8. Once you are done, click on the Save button, it will redirect you to Process canvas. Finally, the Process will look like the following screenshot
Don’t forget to active the Process by clicking on the Activate button
It’s time to test this App
Now onwards if a user creates an event for the public calendar Universal Container Conference Rooms, then Process Builder will automatically post a message in the Chatter group UC Internal Announcement. To create an event for public calendar, Universal Container Conference Rooms follow the below instructions
1. Click on the Home tab then navigate to Calendar related list and click on the Single User View.
2. Now click on the Change link to change the calendar view from single user to the public calendar, as shown in the following screenshot
3. Now select the public calendar Universal Container Conference Rooms as shown in the following screenshot
4. The next step is to create an event. For this click on the New Event button once you are done, navigate to the Chatter Group UC Internal Announcement and check out the Chatter group wall, it will look like the following screenshot
Note: – Process Builder only allows you to post message type TextPost. If you want to post LinkPost or PollPost then, in that case, you have to use Flow and Process Builder.