Rate this page:

How to Create Chatter Notifications from Inbound Messages

Before you start, be sure that you've completed the following requirements:

• Complete the instructions outlined in the previous help guide: Receive Incoming Messages in Salesforce.
• Create a Chatter group that you can post messages to. If you are unsure about how to do this, check out the Salesforce documentation on how to set up a Chatter group.

In this section of the guide, you’ll learn how to create a Salesforce Chatter notification when you receive an inbound message.

1. Create a new Process Builder flow

In your Salesforce setup home page, go to the left-hand navbar and click on Process Automation > Process Builder:

Create a new Process Builder flow

On the My processes page, click the New button at the top right corner:

Add a new Process

In the New Process panel, enter the following information:

  • Process NameSMS Chatter Notification, or a custom name.
  • API Name SMS_Chatter_Notification. Press Tab to auto-populate this field.
  • DescriptionCreates a Chatter notification on inbound SMS. This is optional.
  • The process starts when — Select A record changes.

New Process for SMS Chatter notifications with Twilio for Salesforce

2. Set up the Process Trigger

Now that you’ve created your Process Builder flow, you can configure it to create the Chatter notification.

Start by clicking on Add Object. Enter Twilio in the Object finder and select Twilio Message as the object to trigger on:

Process Trigger.png

Then, under Start the process, make sure that you’ve checked only when a record is created:

Start a process only when the record is created

3. Define the process criteria

Now that you have your trigger set up, you need to configure the process so it only creates Chatter events when inbound messages are created.

In the diamond underneath the Twilio Message trigger, click on Add criteria. You’ll see a side panel headed Define Criteria for this Action Group appear.

Specify the following values:

  • Criteria Name — Incoming SMS.
  • Criteria for Executing Actions — Conditions are met.
  • Set conditions:
    • Field: Choose Direction.
    • Operator: Choose Equals.
    • Type: Choose Picklist.
    • Value: Choose Inbound.

Twilio Incoming Message Check

Once you’ve specified those conditions, click the blue Save button at the bottom of the panel.

4. Specify your action

Now that you have a trigger and criteria set up so that your process will only execute actions for an inbound message, you can trigger different types of events within Salesforce such as email or Chatter. For this example, we’ll post to Chatter.

First, click on Add action in the Immediate Actions box. Then specify the following values in the side-panel that appears:

  • Action name: Post to Chatter, or a custom name of your choice.
  • Post to: Select Chatter Group.
  • Group: Select the group you wish to post to. In our example, it’s SMS Notifications. Read this Salesforce documentation about setting up a Chatter group if you do not have one configured.

For the message, click on Merge field and add Number Unformatted as well as Body. You should end up with the following in your message field:

New Message from {![TwilioSF__Message__c].TwilioSF__From_Number_Unformatted__c}: {![TwilioSF__Message__c].TwilioSF__Body__c}

Post Twilio SMS to a Chatter group in Salesforce

6. Activate your Action and test

Click on the blue Activate button in the top-right corner of the Process Builder window. Now try texting a message to your Salesforce instance. You should see new messages arriving in your Chatter group:

Activate your SMS Action

Alternatively, you can also post the Chatter directly to the message owner, instead of a group.

Your configuration to post a Chatter to user will be:

Post to: Select User.
User: Choose Select a User from the Record.
In the Search box: [TwilioSF__Message__c].Owner:User.Id.

Rate this page:

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.

Thank you for your feedback!

Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

Sending your feedback...
🎉 Thank you for your feedback!
Something went wrong. Please try again.

Thanks for your feedback!