SAP Cloud for Customer: Always Prefix Your Phone Numbers With A ‘+’
In the SAP Cloud for Customer solution each phone number is stored in two different representations.
There is the structured representation of the GDT PhoneNumber consisting of the components CountryCode, AreaID, SubscriberID, ExtensionID. Most message based communication, including replication to and from SAP OnPremise systems, uses this representation.
There is also the single field representation or formatted number where – as the name implies – the whole number is stored in a single field. The UI uses exclusively this representation, but it is also used in some other scenarios like Outlook integration.
In this blog I want to talk a about the single field representation, and specifically how to maintain a full international phone number.
The standard way – not only in SAP systems – to maintain a number in single field representation is
+<international dialing code> (<Area ID>) <Subscriber ID> – <Extension ID>
Instead of the brackets ‘(‘ and ‘)’ it is also customary in several countries to separate the AreaID and the SubscriberID by ‘-‘ or ‘/’.
The main focus of this blog post will be the leading ‘+’ and why there is no alternative to it.
It is this leading ‘+’ that denotes in a distinct way that the number is an international number that includes the international dialing code.
No other way to note down a phone number can achieve this. It has been suggested in the past that the coding could also recognize other notations, in particularly a leading ’00’, as a way to denote an international number. Unfortunately this notation is not distinct, since not all countries use the exit code ’00’.
To illustrate this, let us have a look at the following number:
This number can be one of (at least) three things:
- It could be the number that someone from Germany (or a host of other countries) dials to reach the number 1491234567890 in the United States
- It could be number that someone from South Korea (or half a dozen other countries) dials to reach the number 491234567890 in the United States
- It could be the number that someone from Australia dials to reach the number 1234567890 in Germany.
A second (similar) example, now with other potential exit codes:
This number also can be one of (at least) three things:
- It could be a domestic number in many countries.
- It could be number that someone from Cape Verde, Burma or Qatar dials to reach the number 1491234567890 in the United States
- It could be the number that someone from the United States dials to reach the number 1234567890 in Germany.
Hence it is impossible for any parsing program to deduce with 100% certainty which part of the phone number is the international dialing code.
So to summarize:
To ensure that the number you provide the Cloud for Customer system with is parsed correctly, always prefix the international dialing code with a ‘+’.
If this leading ‘+’ is missing the Cloud for Customer system will have no choice but to assume that the provided phone number is domestic.