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:
- In the App Launcher, go to "Opt-In Keywords" and create a new one (e.g. volunteer).
- In the object manager, add a custom checkbox field to the contact, e.g. "SMS Opt In".
- Create a new process builder flow called "Add SMS Opt-In to Contact"
- Set the process builder flow to be triggered when an Opt-In record is created or updated.
- 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.
- As the immediate action, update the Contact so that our SMS Opt In custom field is set to true.
- Go back to a contact and click "Edit Page" to open the Salesforce Lightning App Builder.
- In the sidebar, add a filter that only displays the component if the "SMS Opt In" field is set to true.
- Save the layout and activate the process builder flow.
Steps to test:
- Text in your keyword (e.g. volunteer) to your Salesforce instance.
- Verify that an Opt-In record was created.
- Check to see if the "SMS Opt In" field was updated to true on the contact.
- Verify that the component is visible for the contact with the opt-in, and not for contacts without the opt in.