Skip to contentSkip to navigationSkip to topbar
On this page

How to Create Chatter Notifications from Inbound Messages


(information)

Info

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

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

1-create-a-new-process-builder-flow page anchor

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 Name SMS Chatter Notification , or a custom name.
  • API Name SMS_Chatter_Notification . Press Tab to auto-populate this field.
  • Description Creates 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

2-set-up-the-process-trigger page anchor

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.

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

3-define-the-process-criteria page anchor

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

4-specify-your-action page anchor

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:

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

6-activate-your-action-and-test page anchor

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.
(information)

Info

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 .

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.