How are phone numbers validated right now?
If Validate user phone numbers is turned on
When phone number validation is turned on for your account (this can be found under Admin → Settings → Customers → Validate user phone numbers) all phone numbers entered in the user profile must be in E.164 format.
The E.164 format is the internationally standardized format for all phone numbers, it includes all the relevant information to route calls and SMS messages globally. E.164 numbers can have a maximum of fifteen digits and are usually written as follows: [+][country code][subscriber number including area code].
Trying to save numbers that don't conform to this format will display an error and will fail to save to the user profile. For example: a US phone number like ‘415 555 2671’ will need to be added as ‘+14155552671’.
If Validate user phone numbers is turned off
When phone number validation is turned off we don’t enforce the E.164 standards but some logic is still applied to a phone number, even when setting it as a direct line ,to try and format it as a valid phone number. This valid format was often achieved by adding a +1 to the start of the number, and by removing spaces and characters. This would often correctly format the number and proved useful to customers adding US phone numbers as the +1 was added automatically without having phone number validation turned on. However it has also proved very difficult for customers trying to add anything but US phone numbers.
Beginning the week of March 6th we will make the following changes:
- When “Validate user phone numbers” is turned off, no formatting will be applied to the number added in the Phone field for a user even when setting that number as a direct line.
- This means that ‘+1’ or ‘+’ will no longer be added.
- Special characters such as (), or additional spaces in the number, will not be removed.
We will take the phone number as provided by you and add it to the user profile.
For better structure and to have numbers that are always actionable we recommend that phone number validation is turned on for your account. To enable this go to Admin → Settings → Customers → Validate user phone numbers.
Please note that only phone numbers in the E.164 format will be able to be associated with a user during incoming calls when using Zendesk Talk. When Zendesk Talk creates new users their phone number will be in the E.164 format.