Getting Started with Process Builder – Part 13 (Post to Chatter)

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 digitrecord Id of public calendar Universal Container Conference Rooms follow the below instructions

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

Record Id of public calender

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 onEvent object to post a message to the Chatter group. To create a Process on theEvent 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

Define Process Properties

5. Click onAdd Object, selectEvent object and for the entry criteria, Select only when a record is created, as shown in the below screenshot and also click on theSave button

Evaluation Criteria

6. The next task is to add ProcessCriteria, To do this click on Add Criteria, enter Name, Type of action andset filter conditions (In this case set [Event].OwnerId Equals023B00000012HLlIAM and click on theSave button, as shown in the following screenshot

Process Criteria

7. Our final task is to add an Immediate action to the Process. Click onAdd 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 Profileor Chatter Group or on Record Chatter Feed. In this case, select Chatter GroupUC Internal Announcement, as shown in the following screenshot

Post to Chatter – Select Chatter Group

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

Post to Chatter – Enter the message

It also allows you to add the existing Topics into the Chatter post. For this, you can enter the Topic name in theTextBoxAdd Topics and select the topic you want to include in the Chatter post as shown in the following screenshot

Post to Chatter – Add Topics

Finally, Post to Chatter action will look like the following screenshot

Add action – Post to Chatter

8. Once you are done, click on theSavebutton, it will redirect you to Process canvas. Finally, theProcesswill look like the following screenshot

Post to Chatter

Don’t forget to active the Process by clicking on theActivatebutton

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 Changelink to change the calendar view from single user to the public calendar, as shown in the following screenshot

Change calendar view

3. Now select the public calendar Universal Container Conference Rooms as shown in the following screenshot

Select public calendar

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

Final Output

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.

11 thoughts on “Getting Started with Process Builder – Part 13 (Post to Chatter)”

Bruce L. Stewart

@rakesh Any way to modularize this across sandbox refreshes? I’ve found even if a Group exists in SB with the same name as in production, I have to deactivate my PBs, and reactivate in sandbox, selecting the desired group.

I’ve looked through some of JenWLee’s blogs, but can’t think of a custom label, custom setting, or custom metadata way to get Process Builder to use the native Post-To-Chatter action to a Group, when I want to look up the group from 1 of these. Am I missing something? Do you get PB in Sandbox to post to group effortlessly after refreshes, or do you have to modify each PB?

I’m trying to via process builder create a chatter post onto the Opportunity record if certain products are contained in the Opp product.

I think I need what you refer to as Record Chatter Feed below, but the only 2 options I see are post to User or Chatter Group, how do you make this third option accessible from Process Builder please?

Thanks
Nic

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

1) To enable “This Record” option under post to chatter action, make sure that you have enabled feed tracking for that particular object.
2) In your scenario, you are creating a PB on Opportunity Product and want to post a message to opportunity record. To achieve this, you have to use both Process and Flow.

M

Its a pretty late reply but thought to answer anyhow – the issue is due to process builder deployed from one sandbox to another, it retains the chatter group salesforce id from the source org even when activated post deployment in target org. You will have to delete the post to chatter action in target and recreate it once more as it will now fetch the target org’s chatter group id.