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?

1:1 SMS Opt-In

Sometimes you may not want your Salesforce users sending 1:1 SMS to a customer unless specific opt-in consent has been collected. This video tutorial outlines how you can create an opt-in process using the Salesforce Process Builder plus the Opt-In functionality already present in Twilio for Salesforce.

Once complete, your SMS users will only see the 1:1 messaging component on users that have texted in a specific opt-in keyword.

The video outlines the following steps:

  1. In the App Launcher, go to "Opt-In Keywords" and create a new one (e.g. volunteer).
  2. In the object manager, add a custom checkbox field to the contact, e.g. "SMS Opt In".
  3. Create a new process builder flow called "Add SMS Opt-In to Contact"
  4. Set the process builder flow to be triggered when an Opt-In record is created or updated.
  5. In the process builder flow, set the criteria that the action will only fire if "Active" is set to true on the Opt-In record.
  6. As the immediate action, update the Contact so that our SMS Opt In custom field is set to true.
  7. Go back to a contact and click "Edit Page" to open the Salesforce Lightning App Builder.
  8. In the sidebar, add a filter that only displays the component if the "SMS Opt In" field is set to true.
  9. Save the layout and activate the process builder flow.

Steps to test:

  1. Text in your keyword (e.g. volunteer) to your Salesforce instance.
  2. Verify that an Opt-In record was created.
  3. Check to see if the "SMS Opt In" field was updated to true on the contact.
  4. Verify that the component is visible for the contact with the opt-in, and not for contacts without the opt in.
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.