Handling Salesforce Phone Number Format Properly

Salesforce is a tremendously powerful tool for keeping your company’s information accessible and useful across the entire organization. Like a lot of powerful tools, though, it’s capable of turning around and biting you if you use it improperly. Many users have discovered that Salesforce has a little bit of trouble formatting phone numbers. Here’s how to get around the Salesforce phone number format issue.

What Salesforce Phone Number Format Is All About

Salesforce’s specialized phone number field includes a lot of automation to try and keep your data straight. When you input a phone number directly through the program’s UI, it will try and convert it into a standardized Salesforce phone number format — (234) 567-8910 — so that all your phone numbers match.

There are two problems with this, though. If you enter a 10-digit number or an 11-digit number that starts with a one, it applies this formatting rule. (In the case of the 11-digit number, it strips off the initial one.) If you enter a shorter or longer number, it leaves it exactly as-is.

The other problem is that this standardization is executed through a JavaScript routine in the UI itself. Phone numbers that are imported into your records through other means don’t go through the process. This all leads to an enormous potential for confusion.

Where Problems Arise

Your difficulties begin once you have a database loaded with phone numbers in different formats and attempt to work with them. Trying to filter records becomes an enormous headache. The filter “phone starts with (234)” will return any records that have gone through the standardization described above, but it will miss any records with phone numbers that begin with “1234” or “234” without parentheses.

Salesforce does include a workaround to avoid its automated number changes: Any phone number entered with a plus sign in front of it will be recorded exactly as entered. This is intended to make it easier to put international numbers with country codes into the system, but it can also be used in other situations.

Potential Solutions

There are a few steps you can use to try and limit the extent of confusion in your Salesforce phone number format. Basic validation rules can be used to check the formatting of phone numbers entered directly into Salesforce. You can also use similar programming tricks to sanitize incoming data from other sources, although the exact nature of the fix will depend on your software.

There is a solution that is simultaneously effective and crude: You can use a regular number field to store phone numbers instead of Salesforce’s specialized phone number field. (Alternatively, you can train your employees to use the plus sign to disable Salesforce’s JavaScript with every number.) Note that if you want to standardize phone numbers stored this way you will have to build a fairly extensive validation system of your own.

Salesforce is a terrific program for illustrating the problems of scalability. Inconsistencies that seem harmless in a collection of a dozen records turn into huge headaches when you have thousands of records. Keeping phone numbers consistent can be particularly challenging, especially if your data is already stored in multiple formats. It’s best to choose one universal approach and make it applicable in all situations.

Related posts