Creating Chatter notifications in Salesforce allows you to alert users to important updates, record changes, or specific events, fostering collaboration and ensuring critical information is seen. The most effective way to automate these notifications is by leveraging Salesforce's declarative automation tools, primarily Process Builder or Salesforce Flow.
How to Create Chatter Notifications in Salesforce?
Automating Chatter notifications in Salesforce typically involves setting up a Process Builder flow (or a Salesforce Flow) that triggers a specific action when certain conditions are met. This allows you to post directly to Chatter feeds or send custom notifications that appear in the Salesforce bell icon.
Leveraging Process Builder for Automated Notifications
Process Builder is a powerful declarative tool that lets you automate business processes, including sending Chatter posts or custom notifications, without writing any code. While Salesforce Flow is the recommended future for automation, understanding Process Builder is still valuable, especially if you have existing processes or are learning the fundamentals of Salesforce automation.
Hereโs a step-by-step guide to setting up Chatter notifications using Process Builder:
Step 1: Navigating to Process Builder
First, you need to access Process Builder from your Salesforce setup.
- From your Salesforce Setup home page, locate the Quick Find box.
- Type "Process Builder" and select it under Process Automation.
- Click New to create a new process.
- Give your process a Name, API Name, and Description (e.g., "Opportunity Stage Change Notification").
- For "The process starts when," choose A record changes for record-triggered notifications, or A platform event message is received for event-driven scenarios. Click Save.
Step 2: Defining the Process Trigger
After creating your process, the next step is to specify which object and when the process should start.
- Click + Add Object.
- Choose the Salesforce object relevant to your notification (e.g.,
Opportunity
,Case
,Account
). - Select Start the process to either:
- only when a record is created: If you want notifications for new records.
- when a record is created or edited: For notifications based on changes to existing records.
- Click Save.
Step 3: Setting the Criteria
This step defines the conditions that must be met for the notification to fire.
- Click + Add Criteria.
- Give your criteria a Name (e.g., "Stage Changed to Closed Won").
- For "Criteria for Executing Actions," choose:
- Conditions are met: To specify one or more conditions.
- No criteria - just execute the actions!: If you want the notification to always fire when the process starts.
- Formula evaluates to true: For more complex logic.
- Set Conditions:
- Select the Field (e.g.,
Opportunity.StageName
). - Choose the Operator (e.g.,
Equals
). - Specify the Type (e.g.,
String
). - Enter the Value (e.g.,
Closed Won
).
- Select the Field (e.g.,
- Optionally, select Do you want to execute the actions only when specified changes are made to the record? to prevent notifications from firing on every edit if the field value hasn't actually changed.
- Click Save.
Step 4: Configuring the Notification Action
This is where you define the type of Chatter notification you want to send. Process Builder offers two main action types for this purpose: "Post to Chatter" or "Send Custom Notification."
Option A: Post to Chatter
Use this action to directly post messages to a record's Chatter feed, a specific Chatter group, or directly to users.
- Click + Add Action under the immediate actions (or scheduled actions if desired).
- For Action Type, select Post to Chatter.
- Give the action a Name (e.g., "Post Closed Won Update").
- For Post To, choose where the Chatter post should appear:
- User: Post to a specific user's feed.
- Group: Post to a Chatter group.
- Record: Post to the feed of the record that triggered the process.
- Message: Compose your Chatter message. You can include merge fields to dynamically pull in record data (e.g., "Opportunity {!Opportunity.Name} has moved to {!Opportunity.StageName} by {!Opportunity.Owner.FirstName}.").
- Click Save.
Example Chatter Post:
When an Opportunity's Stage changes to "Closed Won," post a message to the Opportunity's Chatter feed:
"Congratulations! Opportunity: [Opportunity Name] has been marked as Closed Won by [Opportunity Owner Name]! ๐"
Option B: Send Custom Notification
This action sends a notification to the Salesforce bell icon (and potentially mobile push notifications), offering a more direct alert to users. This requires a pre-configured Custom Notification Type.
- Before this step, ensure you have a Custom Notification Type set up in Setup (under "Notification Builder").
- Click + Add Action.
- For Action Type, select Send Custom Notification.
- Give the action a Name (e.g., "Alert Account Owner").
- Custom Notification Type: Select the pre-configured custom notification type.
- Notification Title: Enter a static title or use merge fields (e.g., "Opportunity Update").
- Notification Body: Compose the message (e.g., "Opportunity {!Opportunity.Name} requires your attention.").
- Recipient ID: Specify who receives the notification (e.g.,
Opportunity.OwnerId
for the record owner, or a specific user/group ID). - Target ID: This is the record ID that the user will be directed to when they click the notification (e.g.,
Opportunity.Id
). - Click Save.
Example Custom Notification:
When a High-Priority Case is created, send a custom notification to the Case Owner:
- Notification Title: "New High-Priority Case!"
- Notification Body: "Case {!Case.CaseNumber}: {!Case.Subject} has been assigned to you and is High Priority."
- Recipient ID:
Case.OwnerId
- Target ID:
Case.Id
Step 5: Activating and Testing Your Action
Once your action is configured:
- Click Activate in the top right corner of the Process Builder canvas.
- Confirm activation.
- Crucially, test your process by creating or updating a record in Salesforce that meets your defined criteria. Verify that the Chatter post appears or the custom notification is received as expected.
Comparison of Notification Types
Notification Type | Primary Use Case | Action in Process Builder/Flow | Visibility | User Interaction |
---|---|---|---|---|
Chatter Post | Collaborative updates, record feed activity, group announcements | Post to Chatter | Record feeds, Chatter groups, user profiles | Can like, comment, mention others, attach files |
Custom Notification | Direct user alerts, calls to action, bell icon notifications | Send Custom Notification | Salesforce bell icon, mobile push | Clicking redirects to a specific record or URL |
Best Practices for Effective Chatter Notifications
- Be Specific: Ensure notifications are triggered by meaningful events to avoid notification fatigue.
- Keep it Concise: Get straight to the point. Users should be able to understand the message quickly.
- Use Merge Fields: Personalize messages with dynamic data from the triggering record for greater context.
- Define Target Audience: Send notifications only to relevant users, roles, or groups.
- Test Thoroughly: Always test your automation in a sandbox environment before deploying to production.
- Consider Salesforce Flow: For more complex automation, future-proofing, and performance benefits, leverage Salesforce Flow as it is the more powerful and strategic automation tool replacing Process Builder. Flow can also execute both "Post to Chatter" and "Send Custom Notification" actions.
By following these steps, you can effectively automate Chatter notifications in Salesforce, enhancing communication and keeping your team informed about critical business events.