Menu

Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Create Chatter Notifications from Inbound Messages

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

In this section of the package, we'll learn how to create a Salesforce Chatter notification when we receive an inbound message.

Create a New Process Builder Flow

In your setup home page, go to the left navbar and click on Process Automation > Process Builder.

Create a new Process Builder flow

On the "My processes" page, click on "New" in the top right corner.

Add a new Process

In the new process modal, enter the following information:

  • Process Name: SMS Chatter Notification (or custom name)
  • API Name: SMS_Chatter_Notification (press tab to auto-populate)
  • Description: Creates a chatter notification on inbound SMS. (optional)
  • The process starts when: Select "A record changes"

New Process for SMS Chatter notifications with Twilio for Salesforce

Set up the Process Trigger

Now that you've created your process builder flow, we can configure it to create the chatter notification.

Start by clicking on "Add Object". Search for "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 selected "only when a record is created":

Start a process only when the record is created

Define the Process Criteria

Now that we have our trigger set up, we need to configure out 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 with the heading "Define Criteria for this Action Group" appear.

Specify the following values:

  • Criteria Name: Create From Event
  • Criteria for Executing Actions: Conditions are met
  • Set conditions:
    • Field: Choose "Created from platform event"
    • Operator: Equals
    • Type: Boolean
    • Value: True

Defining process criteria in Salesforce

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

Specify your action

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

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

Activate your Action and test

Click on the blue "Activate" button in the top-right corner of the process builder window. Then, try texting in to your Salesforce instance. You should see new messages arriving in your chatter group when you text in.

Activate your SMS Action

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 browsing the Twilio tag on Stack Overflow.