Entering Telephone Number Values through Web Services
Telephone number values entered through Web service requests and the Oracle CRM On Demand UI are displayed differently both in the UI and in the response to the QueryPage operation. The following table shows how telephone number values are displayed in the UI or within the response to a QueryPage request.
Input Mechanism | Formatting in UI | Formatting in Web Service Response |
---|---|---|
Input through Web service |
||
14045550199123 |
1 (140) 555-0199#1123 |
+1 404 5550199 #123 |
140455501991 |
1 (140) 555-0199#1 |
+1 404 5550199 #1 |
+14045550199,123 |
1 (4045550199) 123 |
+1 4045550199 123 |
Input through UI |
||
14045550199123 |
14045550199123 |
+1 4045550199123 |
14045550199 |
1 (404) 555-0199 |
+1 404 5550199 |
+14045550199,123 |
1 (404) 555-0199#123 |
+1 404 5550199 #123 |
Telephone number values differ from other values in that the format of the value impacts the accuracy of the value. When querying for a telephone number value, it is necessary to return the value with formatting.
Recommended Formats for Telephone Numbers
When determining the value to be input through Web Services you must take into account how the telephone number will appear in the UI and in the Web service response.
The following formats are recommended for telephone numbers entered through the UI or Web services, as they are formatted the same way in the UI and in Web service responses:
1 (404) 555-0199 123
1 (404) 555-0199 #123
1 (140) 555-0199#1
1 (140) 555-0199
The following is an example of a request that uses one of the above formats to insert a Contact with telephone number fields.
<ListOfContact>
<Contact>
<ContactFirstName>Contact</ContactFirstName>
<ContactLastName>Name</ContactLastName>
<WorkPhone>1 (404) 555-0199 #123</WorkPhone>
<PHONE_000>1 (404) 555-0199 #123</PHONE_000>
</Contact>
</ListOfContact>
The following is the query response:
<ListOfContact xmlns="urn:/crmondemand/xml/Contact/Data" lastpage="true">
<Contact>
<ContactFirstName>qq2</ContactFirstName>
<ContactLastName>ww2</ContactLastName>
<WorkPhone>1 (404) 555-0199 #123</WorkPhone>
<PHONE_000>1 (404) 555-0199 #123</PHONE_000>
</Contact>
</ListOfContact>
Other Considerations for Telephone Numbers
If you use the + character and parentheses () characters together in a Web services request, the number is displayed differently in the UI and Web service response. For example, the input:
+1 (404) 555-0199 #123
is displayed as the following in the Web service response:
+1 404 5550199 #123
and as the following in the UI:
1 (404) 555-0199 #123
It is not possible to modify the telephone number in the UI to display a + prefix for a telephone number, or to remove the parentheses () from a telephone number using Web services. For example, the input:
+1 404 555-0199 #123
is displayed as the following in the Web service response:
1 404 5550199 #123
and as the following in the UI:
1 (404) 555-0199 #123
There are locale considerations when entering telephone
numbers. As an example, if the user locale is set to Australia (country
code +61) and a Web service request contains the 10 digit telephone
number: 0477777777
, then the number displayed in
the UI is:
+1 047 777-7777
as the number displayed defaults to the North American Numbering Plan if the country code is not included. In this case, the user locale (Australia) is not considered.
If you enter
the same telephone number (0477777777
) in the UI
or through import, the telephone number displayed in the UI is:
(04) 7777 7777
where the country code is set to Australia.
To make the behavior consistent across Web service requests and the UI, it is recommended that in Web service requests you prefix the number with the + character and country code. For the previous example, the telephone number in the Web service request would be:
+61477777777
Telephone numbers submitted through Web service requests
must not begin with an alphabetic character and must either begin
with a numeric value or a + character. For example, updating a telephone
number field with the value DO NOT CALL
would result
in an error being returned to the client. However, specifying the
value 1DONOTCALL
would succeed.