Using ph_number (Phone Number) not e164 format

Michelle Murtha
Tera Expert

Things that make me go "hmmmmm..."

 

Working with the phone number field in the core Company table (core_company).  This is a brand new Vancouver instance, including CSM.  The Phone Number field on the table is using a Field type of "Phone Number" (ph_number).  If you look for documentation on how to format this field type, all you can find is the new phone number type "Phone Number (E164)" (phone_number_e164).  There is nothing on the legacy ph_number field or any potential properties you can set.  (I'm wondering when ServiceNow is going to update their core products to use the new field type, or if they are going to reinstate the documentation for the legacy ph_number field type...)

 

Why do I care?  well, I've got a bunch of data to load from a non-ServiceNow source which includes extensions in the phone number field.  Yes, I saw the older posts about having to push the extension into a separate field (that you have to create...)  HOWEVER, I tried something interesting... AND IT WORKED!

 

Many of you are aware that an auto-dialers use a comma (,) to indicate a pause - you see it in call in numbers for conferencing, etc.  One of the data records I am loading looks like this:  999-999-9999 , 999

 

So, I tried it and when saved, it converts it to (999) 999-9999 , 99

I then tried a number of combinations and these all worked too!

(999) 999-9999,99

(999) 999-9999,,,,,,99

(999) 999-9999 99

(999) 999-9999 - 99

(999) 999-9999 +99

(999) 999-9999 .99

 

Characters that didn't work: x ! @ # $ % ^ & * _ = {} [] / ~ | \ ' " < > ? : ; 

I found zero documentation on this so I wanted to share what I discovered here.

 

Beyond the extension, though, I'm wondering if we should convert to the E164 format before we load data...  Any thoughts on this?  I don't usually like to change the field type of OOTB fields, but in this case, the OOTB field type doesn't appear to be supported by ServiceNow...  If anyone has done this, have you run into any challenges since then?  Any issues with upgrade?

1 REPLY 1

Kieran Anson
Kilo Patron

Hey,

It's unlikely SN will update the field type on long-standing tables like core_company in fear of breaking multiple customers implementations. One of the headaches of a growing platform unfortunately!

 

The recommendation is now to use Phone Number (E164) if we, as customers, identify a need to store phone numbers above what a table might provide as it supports multiple country codes.

 

If you're curious how formatting works for a phone field, you can look at the client script that runs on record viewing

https://yourinstance.service-now.com/scripts/formatting.js