Menu

Expand
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?

App Installation and Setup

How to Get the App

Twilio for Salesforce is available in the Salesforce AppExchange. Click on "Get It Now" to receive an email with a link to the package and installation instructions. The trial package includes 30 free seats for 30 days. Twilio for Salesforce is priced at $15 per seat per month with volume discounts available. Contact sales for more information about purchase and discounts.

You must contact sales to continue using the package after the 30 day trial. Upgrading your Twilio Account by providing a credit card will not provision a Salesforce license. Licenses can only be purchased and provisioned through a Sales representative at this time.

Allowing your license to expire without uninstalling the package can cause serious side-effects for your organization if you use any of the package's Apex classes in process builder. Process builder will error when it attemps to access Twilio for Salesforce, and may prevent records from saving.

Twilio for Salesforce is partially supported. Twilio's support agents can help answer questions about Twilio Account configuration, or address any of the issues in our FAQ. If support cannot resolve your issue you will be escalated to the product team, which operates 9am-5pm PT Monday - Friday. Product team will do its best to respond in a timely manner, but responses may take several hours or days.

Twilio for Salesforce prerequisites

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

We recommend reading this entire guide for setup, but for a click-by-click view of the install process, we've created a video outlining the major configuration steps needed to use the package.

Configure your Twilio Account

To use Twilio for Salesforce, you'll need to create (or gather) the following things:

Let's walk through each one.

Obtain your Twilio Account SID

Navigate to your Console dashboard and copy the "Account SID" value from the front page.

Leave this page open, or copy the value to a safe place - you'll need it when you configure the Salesforce package.

Account SID

Create an API Key and Secret Pair

Next, you'll need to create an API Key and Secret to allow your Salesforce instance to communicate with Twilio.

Visit the API Key console, then create a new API key pair by pressing the red plus (+) button:

Create API keys

Give your API key a name - whatever you want.

This next bit is important: Make sure you create a "Master" API key!

API keys, naming and type

Click the "Create API Key" button.

You should be presented with two long strings. These are the API credentials you must provide in your Salesforce configuration to communicate with Twilio.

Save these credentials in a secure location/text file: they will only be shown once!

Keys confirmation

Create a Messaging Service

A Messaging Service is a resource within Twilio that allows API users (like your Salesforce organization) to send and receive SMS messages using one (or many) virtual Twilio phone numbers.

Using Twilio's Messaging Copilot, you can configure your Messaging Service to operate at any scale or in a variety of countries around the world. To get started, we'll create a messaging service that's powered by one Twilio number.

First, navigate to the Messaging Services section of the Twilio Console. Create a new Messaging Service by clicking the plus (+) button.

messaging services

Give your Messaging Service any name you'd like.

Choose the "Notifications, Two-Way" use case (you can choose another one if you know exactly what you're doing).

copilot messaging service

After creating your Messaging Service, navigate to the "Numbers" section of its configuration UI.

messaging service numbers

Here, you'll configure a "pool" of virtual Twilio phone numbers from which your users/customers will receive SMS messages.

When SMS messages are sent from Salesforce, those messages come from a numbers in this pool. How many and what kind of numbers you need in this pool will depend greatly on your use case, and how many messages you will need to send per day.

Message Volume Number Pool Needs
Less than 250 messages per day At least one Twilio phone number
250 - 1000 messages per day. At least four Twilio phone numbers
More than 1,000 messages per day Consider a short code (US and Canada), with multiple long codes to use as a fallback based on volume. Contact a Twilio expert to help plan for your needs.
More than 1,000 international messages per day At least one Twilio number, ideally local in the country where you plan to send messages. Check international coverage for SMS here. Contact a Twilio expert to help plan your strategy for international messaging.

For more information on capacity planning, check out our FAQ on the topic.

That's all you'll need on the Twilio side! Next, let's look at how to install and configure the Twilio for Salesforce package.

Install Twilio for Salesforce

Install the Twilio for Salesforce package through the App Exchange flow.

Follow the prompts to install the package. If you haven't enabled it already, you may need to enable My Domain for your organization to install the package.

Configure your Twilio credentials

Next, you'll need to configure your Twilio account credentials using the Account SID and API Keys you created in the last step.

In Lightning Experience, you'll find a new page in the Launcher UI to configure Twilio.

Twilio config in launcher

Go to this page and enter your Twilio account credentials, which you collected or created earlier. After validating your Twilio credentials, select the Messaging Service you created earlier from the dropdown that appears.

Twilio Salesforce Config

Hit 'Save', and you're all set with your Twilio configuration.

Add users to the Twilio permission sets

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 org 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.

(If you need help finding this feature in the Salesforce Setup UI, check out the video at the top of the page.)

That's it! You can now start using Twilio for Salesforce to set up appointment reminders, engage with donors, and generally automate all the things.

Production Only: Add Users to Licenses

In production instances of Salesforce, you'll need to provision your users with licenses. You can do this by going to Setup > Apps > Installed Packages > Twilio for Salesforce. The trial package includes 7 free seats for 30 days. Twilio for Salesforce is priced at $15 per seat per month with volume discounts available. Contact sales for more information about purchase and discounts.

Screen Shot 2019-04-12 at 6.20.00 PM.png

Click on manage licenses, and then select the users who you would like to have access to the package. You do not need to provision every user in your organization, only those who will be using Twilio SMS.

Screen Shot 2019-04-12 at 6.20.49 PM.png

Next Steps with Twilio and Salesforce

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

See more Twilio for Salesforce tutorials here:

Note: We highly recommend following the steps outlined in "Pushing Inbound Messages and Status Updates to Salesforce" as an additional configuration step. To limit outbound API requests, by default Twilio for Salesforce will poll for messages every 15 minutes unless the lead or contact is open. Once message push is configured, messages will arrive in Salesforce within seconds.

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.