Big Idea or Enduring Question:
How can users be allowed to delete individual Chatter messages?
Objectives:
After reading this article, the reader will be able to:
- Launch a flow from Process Builder
- Use automation to increase user permissions
- Create a custom object to store the Id of a Chatter message
- Use Flow to delete the Chatter Message
Business Use case
Rachel Gillett is working as a System administrator at Universal Containers (UC). She has received a requirement from management to allow their Sales reps (License Type: – Salesforce Platform) to delete Chatter messages one-by-one from the Salesforce UI.
Automation Champion Approach (I-do):
**Chatter Messages functionality is only available in Classic
First, it is important to understand Chatter messages and Chatter Conversations in Salesforce. Chatter messages let you have secure private conversations with other Chatter users. Use messages to send your colleague a question privately or to communicate with a few selected people when a discussion isn‘t relevant to everyone you work with. A Chatter conversation consists of messages that conversation members have sent or received.
Remember the following points for using Chatter messages
- A private message can include up to 9 members, including yourself.
- Messages sent will not be viewable through Chatter feed, Chatter Profile, or Global Search results.
- You can’t delete messages or conversations.
- An administrator with the Manage Chatter Messages permission can view and delete all users‘ messages in Chatter. This may be necessary for compliance purposes
- Messages are hard deleted. They aren’t sent to the Recycle Bin.
- Deleted messages aren’t included in message search results.
- If all messages in a conversation are deleted, the conversation doesn‘t show in My Messages and can’t be retrieved via the Chatter REST API.
- If after reading the messages in a conversation you want to mark the conversation unread, you can do so only via the Chatter REST API, not via the user interface.
There are a few possible solutions for the above business scenario, but I’ll use Process Builder and Flow to solve the business requirement. As discussed earlier, a System Administrator with the Manage Chatter Messages permission can view and delete all users’ messages in Chatter. Business users are not allowed to delete messages or conversations.
In Salesforce the ChatterMessage object represents a message sent as part of a private conversation in Chatter. There are some relevant fields to identify:
Field Name | Details |
Id | Chatter Message Id |
ConversationId | The ID of the conversation that the ChatterMessage is associated with. |
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.
Guided Practice (We-do):
There are 4 steps to solve Rachel’s business requirement using Flow and Process Builder. We must: Read the rest of this entry!