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?

Assign Personal Phone Numbers to Salesforce Users

The personal phone numbers feature is only available in version 4.4 of the Twilio for Salesforce package and later. Bulk update of personal phone numbers is availble in version 4.10 and later.

About Personal Phone Numbers

The personal phone number feature allows a Salesforce administrator to assign a phone number to an individual Salesforce user. Without personal phone numbers, Twilio for Salesforce uses Copilot to choose the best number in your number pool. Once enabled, personal phone numbers ensures that outbound messages from a Salesforce user are always sent from the same phone number. This is useful if you need to establish a 1:1 relationship between users and phone numbers, such as if the Salesforce user sending the message distributes business cards with a contact phone number.

Even with personal phone numbers enabled, it's important to have phone numbers in your number pool for two reasons:

  1. Users who aren't assigned a personal phone number will continue using the number pool.
  2. The number pool will be used for all 1:many messages sent from campaigns and process builder. This is due to the fact that if a single long code number were used for large message sends, it could result in carrier filtering.

When you enable the personal phone number feature, Salesforce will begin importing messages from all phone numbers in your Twilio Project. If you have some phone numbers with a high amount of traffic that are not used by Salesforce, these messages will be imported into Salesforce. Consider creating a separate Twilio Project for Twilio for Salesforce if you anticipate this issue.

Setting Up Personal Phone Numbers

Step 1: Go to the "Twilio Configuration" page and click "Enable Personal Phone Numbers".

Enable Personal Phone Numbers in Twilio for Salesforce

Step 2: Make sure you understand the warning about pulling all messages from your Twilio project and then click continue.

Reusing phone numbers for Salesforce will import messages from Twilio

Step 3: Click on "Add New"

Add Personal Phone Numbers in Twilio for Salesforce

Step 4: Select a Salesforce user from the dropdown, select the corresponding phone number, then click "Save".

Note: Users will not appear in the dropdown menu unless they have been added to the "Twilio User" permission set.

Assign a Personal Phone Number in Twilio for Salesforce

Bulk assignment of personal phone numbers is only available in version 4.10 and above.

Bulk Assign Personal Phone Numbers with Data Loader

In addition to configuring personal numbers through the configuration UI, it is possible to bulk-update user phone numbers with Data Loader.

Step 1: Log in to your Salesforce organization with Data Loader.

Screen Shot 2019-04-22 at 2.10.41 PM.png

Step 2: Select the User object to extract from your Salesforce organization and pick the directory where this data will be extracted to.

Screen Shot 2019-04-22 at 2.11.15 PM.png

Step 3: Choose the fields to extract from the user:

  • User ID (Required)
  • TWILIO_PERSONAL_NUMBER__C (Required)
  • First Name (Optional)
  • Last Name (Optional)
  • TWILIO_PERSONAL_NUMBER_IS_VALID__C (Optional)

User ID and TWILIO_PERSONAL_NUMBER__C are the only required columns, but you should include others to make spot-checking easier.

Screen Shot 2019-04-22 at 2.22.03 PM.png

Step 4: Click on "Finish" to extract the User records to your computer.

Step 5: In Microsoft Excel, Google Sheets, or another spreadsheet editor, match User IDs to a list of Personal Phone Numbers (note: these numbers must be in your Twilio Account).

Note: All phone numbers must be in the E.164 formt (e.g. +1234567890). Do not include parentheses, spaces or dashes and prepend a + sign. If you're using excel, make sure that the cell type is text so that it doesn't strip out the +.

Screen Shot 2019-04-22 at 2.14.47 PM.png

Step 6: In Data Loader, click on "Update", select "User" as the object to update, and the select the CSV file with your personal numbers assignments.

Screen Shot 2019-04-22 at 2.29.16 PM.png

Screen Shot 2019-04-22 at 2.30.49 PM.png

Step 7: Map the User ID field to the User ID field in data loader, and map the phone number column to TWILIO_PERSONAL_NUMBER__C.

Screen Shot 2019-04-22 at 2.33.41 PM.png

Step 8: Set your log folder so that you can view debug logs if necessary. This is typically the same folder as your data source.

Step 9: Click Finish in the wizard and import your data.

After you have configured your phone numbers, you should see the appear in the UI in the Twilio Configuration page.

Screen Shot 2019-04-22 at 2.43.35 PM.png

As Twilio for Salesforce bulk assigns personal numbers, we check to make sure that each phone number is present in your Twilio Account. If a number is invalid, we set the TWILIO_PERSONAL_NUMBER_IS_VALID__C on the User record to false. This will allow you to check and update phone numbers that were entered incorrectly or do not exist in your Twilio account.

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.