Personal numbers allow you to assign a dedicated phone number to an individual Salesforce user. By default, Twilio for Salesforce chooses a number in your messaging service for your Salesforce users to use.
With personal numbers, 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.
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.
Step 1: Go to the "Twilio Configuration" page and click "Enable Personal Phone Numbers".
Step 2: Make sure you understand the warning about pulling all messages from your Twilio project and then click continue.
Step 3: Click on "Add New"
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.
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.
Step 2: Select the User object to extract from your Salesforce organization and pick the directory where this data will be extracted to.
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.
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 +.
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.
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.
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.
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.