Skip to contentSkip to navigationSkip to topbar
Page toolsOn this page

App Installation and Setup



How to get the app

how-to-get-the-app page anchor

Start your free trial of Twilio for Salesforce(link takes you to an external page). The trial package includes 30 free seats for 30 days.


Twilio for Salesforce prerequisites

twilio-for-salesforce-prerequisites page anchor

Twilio for Salesforce installation takes 10-20 minutes. Let's get started.


Install the app and configure your setup

install-the-app-and-configure-your-setup page anchor

1. Install Twilio for Salesforce from the AppExchange

1-install-twilio-for-salesforce-from-the-appexchange page anchor

Install Twilio for Salesforce using the links available on this page(link takes you to an external page). When prompted, select Install for All Users :

Twilio for Salesforce package details with Add Users button highlighted.

Once the package has finished installing, search for Twilio Configuration from the Salesforce App Launcher. You should then see this page:

Get Twilio Configuration from the Salesforce App Launcher.
(warning)

Warning

Twilio is only able to provide support for the latest version of the application. Because this product is in Beta, support is limited to the latest version of the product. To view the current app version, please visit Twilio for Salesforce Changelog.

2. Obtain your Twilio Account SID and Auth Token

2-obtain-your-twilio-account-sid-and-auth-token page anchor
  1. From the Twilio Configuration page in Salesforce, click on the Create Account or Log In buttons to go to the Twilio Console.

  2. You'll be asked to log in — this will take you to your Account dashboard. Scroll down to the Account Info section.

  3. Copy the Account SID and Auth Token values from the front page of the Console:

    Twilio account info with SID, auth token, and phone number details.
  4. Back in Salesforce, paste your Account SID and Auth Token into Salesforce, then click on Validate Credentials :

    Twilio connect panel with fields for Account SID and Auth Token.
  5. You'll see a confirmation message like this:

    Twilio account connection confirmed with account SID and auth token.
(information)

Info

If you need to configure Twilio with multiple Salesforce instances or environments, we recommend creating a separate Twilio Account(link takes you to an external page) for each instance. Each instance will have its own Account SID and Auth Token.

3. Create a messaging service

3-create-a-messaging-service page anchor

A messaging service is a pool of Twilio phone numbers that are enabled with software to prevent text encoding issues, provide international phone numbers, and scale messaging capacity. Twilio for Salesforce uses a messaging service to provide phone numbers for three types of SMS:

  • SMS sent from Salesforce users that don't have a personal phone number assigned.
  • Campaign SMS sent from the Campaigns Lightning Component.
  • Notifications sent from the Send SMS Process Builder action.
  1. To create a messaging service, open the Messaging Services page in the Twilio Console(link takes you to an external page).

  2. Click on Create new Messaging Service :

    Messaging Services page with Create Messaging Service button for SMS and WhatsApp.
  3. Give your messaging service a name that makes sense for your project: for example, Connect to Salesforce. When you're ready, click the blue Create Messaging Service button to establish your new messaging service:

    Messaging Service setup with step 1 highlighted, naming service 'Connect to Salesforce'.

If you already have phone numbers ready and a TwiML Bin that will manage the webhook that will be used to relay messages to Salesforce, you can proceed through the messaging service setup wizard. For this guide, we assume that you don't, so just click the Skip Setup button for now. We'll work through each of these setup stages separately.

4. Add phone numbers to your messaging service

4-add-phone-numbers-to-your-messaging-service page anchor
  1. In the Console's left-hand sidebar, click on Explore Products , scroll to the Super Network section, click on Numbers , then on the Buy a number button.

  2. Use the phone numbers interface to search for a number and then click on Buy to purchase it:

    Twilio for Salesforce configure app — buy a phone number.
  3. Now return to your messaging service — click on Services under Messaging in the Console's left-hand sidebar. You'll see your message service listed by name — click on it and then click on Sender Pool in the sidebar.

  4. Click the Add Senders button:

    Sender Pool page in Twilio for Salesforce with add senders button.
  5. In the Add Senders panel, make sure the Sender Type is Phone Number and click Continue :

    Add sender's phone number for two-way messaging with Twilio in Salesforce.
  6. Now select the number you just bought, and click the Add Phone Number button:

    Add senders screen in Twilio for Salesforce with phone number selection options.

5. Select your messaging service in Salesforce

5-select-your-messaging-service-in-salesforce page anchor

Return to the Twilio Configuration page in Salesforce and refresh the page. You can now be able to select your messaging service from the Select Message Service popup menu. Do so then click Validate Credentials :

Connect to Salesforce and validate.

Once your Twilio Account SID, Auth Token, and messaging service have been validated, you'll see the full list of configuration options appear on the Twilio Configuration page:

Twilio Configuration page showing account connection and license purchase options.

6. Add Lightning components to Salesforce layouts

6-add-lightning-components-to-salesforce-layouts page anchor

You can add Twilio for Salesforce's Lightning components to your layout using Salesforce's Lightning App Builder. Open the Lightning App Builder by opening a record (Leads, Contacts, Person Accounts, Cases, or Campaigns), clicking on the configuration gear icon, and then selecting Edit Page .

You can then use the Lightning App Builder to add components, such as Twilio's Two-Way Messages, to the page:

Lightning App Builder showing Twilio Two Way Messages component added to Contact Record Page.

Click Save in the top-right corner of the Lightning App Builder and then follow the instructions to deploy your layout to users.

(information)

Info

When you've completed this guide, you might like to check out our guides to these Lightning components:

7. Add users to the Twilio permission sets

7-add-users-to-the-twilio-permission-sets page anchor

The last step before using the Twilio features in your Salesforce install is to add users.

Anyone who should have access to Twilio functionality should be divided between the two new permission sets that were added to your organization during installation: Twilio User and Twilio Administrator .

  • A User can send and view messages, and generally access all the features of the package.
  • An Administrator will be able to view and configure Twilio API credentials.

To add these permission sets in Salesforce:

  1. Go to Setup then search for Permission Sets in the find field, then click on the permission set you'd like to provision:

    Salesforce Permission Sets page showing user assignment options.
  2. On the Permission Set page, click on Manage Assignments :

    Salesforce setup page showing Twilio Administrator permission set with Manage Assignments highlighted.
  3. Click on the user you would like to assign to the permission set:

    Select a user.

If you're in a sandbox environment, you don't need to do anything further — you can jump ahead past the next step. If you're in a production organization, however, you'll need to configure Salesforce licenses for the users who'll need access. We'll show you how to do that now, but if you are a sandbox user, jump to the next step.

8. Production only: add users to licenses

8-production-only-add-users-to-licenses page anchor

In production instances of Salesforce, you'll need to provision your users with licenses. The trial package(link takes you to an external page) includes 30 free seats for 30 days. For more pricing options, contact sales(link takes you to an external page).

  1. You can do this by going to Twilio App in Salesforce > Twilio Configuration > Purchase Licenses and then clicking on Configure Licenses :

    License configuration with active status, cost per seat $15, monthly cost $45, and configure licenses button.
  2. Click on Add Users , and then select the users who you would like to have access to the package:

    Add Users.
  3. You do not need to provision every user in your organization, only those who will be using Twilio functionality:

Select users for Twilio Salesforce package, with Jacob Talbot highlighted and added.

That's it — you're done!


Next steps with Twilio and Salesforce

next-steps-with-twilio-and-salesforce page anchor

Now that your Twilio for Salesforce install is all set, it's time to start sending some messages.

Here are some more Twilio for Salesforce tutorials to help you make the most of your installation: