Mapping Primary Address Fields Using Web Services
In Web services requests, a PrimaryAddressLine1 field is used to dynamically map the primary address field from an external application to the primary address field in Oracle CRM On Demand. The primary address field in Oracle CRM On Demand can vary depending on the Country value for each address; thus the PrimaryAddressLine1 field will map to a different field in the address object based on the Country value. The following tables show the mapping for the PrimaryAddressLine1 field depending on the selected Country value.
Address | Lead | Account (Billing Address) | Account (Shipping Address) | Contact (Account Address) | Contact (Contact Address) | Country |
---|---|---|---|---|---|---|
Street Address |
Street Address |
Bill To Street Address |
Ship To Street Address |
Personal Street Address |
Primary Street Address |
Group A See the following table |
Street Address 3 |
Street Address 3 |
Bill To Street Address 3 |
Ship To Street Address 3 |
Personal Street Address 3 |
Primary Street Address 3 |
Nauru |
Postal Code |
Postal Code |
Bill To Postal Code |
Ship To Postal Code |
Personal Postal Code |
Primary Postal Code |
Group B See the following table |
County |
County |
Bill To County |
Ship To County |
Personal County |
Primary County |
Group C See the following table |
Province |
Province |
Bill To Province |
Ship To Province |
Personal Province |
Primary Province |
Qatar |
City |
City |
Bill To City |
Ship To City |
Personal City |
Primary City |
Papua New Guinea |
Group | Countries |
---|---|
A |
United States and all other countries apart from those in groups B and C, and those mentioned in the previous table. |
B |
Hungary, Belarus, Burkina Faso, Congo, Kazakhstan, Kyrgyzstan, Russian Federation, Congo Sudan, Turkmenistan, Ukraine |
C |
Antigua and Barbuda, Benin, Burundi, Botswana, Cameroon, Central African Republic, Chad, Comoros, Djibouti, Equatorial Guinea, Eswatini, Ethiopia, Gabon, Ghana, Guinea, Ivory Coast, Kenya, Lesotho, Malawi, Mauritania, Namibia, Niger, Niue, Oman, Puerto Rico, Rwanda, Seychelles, Solomon Islands, Tanzania, Togo, Tonga, Tuvalu, Uganda, United Arab Emirates, Vanuatu |
Querying for an Address Record using PrimaryAddressLine1
When using the PrimaryAddressLine1 field to query for an address record, the value returned is the value contained in the mapped field for the specified country. For example, when querying for an address with <Country>Canada</Country>, the PrimaryAddressLine1 field is mapped to the Address field:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/
2001/XMLSchema">
<SOAP-ENV:Body><ns:AccountQueryPage_Output xmlns:ns="urn:crmondemand/ws/ecbs/account/">
<ListOfAccount xmlns="urn:/crmondemand/xml/Account/Data" lastpage="true">
<Account>
<Location>Toronto</Location>
<AccountName>ACCOUNTTEST1</AccountName>
<ListOfAddress lastpage="true">
<Address>
<Id>1QA2-R7C3O</Id>
<StreetAddress3></StreetAddress3>
<Country>Canada</Country>
<County></County>
<Description></Description>
<Province>ON</Province>
<ZipCode>M2H 3G5</ZipCode>
<City>Toronto</City>
<IntegrationId>1QA2-R7C3O</IntegrationId>
<Address>100 Main Street</Address>
<StreetAddress2></StreetAddress2>
<PrimaryAddressLine1>100 Main Street</PrimaryAddressLine1>
</Address>
...
</ListOfAddress>
</Account>
</ListOfAccount>
</ns:AccountQueryPage_Output>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
whereas, when the <Country> value is Togo, the PrimaryAddressLine1 field maps to the County field:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/
2001/XMLSchema">
<SOAP-ENV:Body><ns:AccountQueryPage_Output xmlns:ns="urn:crmondemand/ws/ecbs/account/">
<ListOfAccount xmlns="urn:/crmondemand/xml/Account/Data" lastpage="true">
<Account>
<Location>Togo</Location>
<AccountName>ACCOUNTTEST2</AccountName>
<ListOfAddress lastpage="true">
<Address>
<Id>1QA2-R7IMS</Id>
<StreetAddress3></StreetAddress3>
<Country>Togo</Country>
<County>10222</County>
<Description></Description>
<Province></Province>
<ZipCode></ZipCode>
<City>Lomé</City>
<IntegrationId>1QA2-R7IMS</IntegrationId>
<Address></Address>
<StreetAddress2></StreetAddress2>
<PrimaryAddressLine1>10222</PrimaryAddressLine1>
</Address>
...
</ListOfAddress>
</Account>
</ListOfAccount>
</ns:AccountQueryPage_Output>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Inserting or Updating an Address Record using PrimaryAddressLine1
When inserting or updating an address record using the PrimaryAddressLine1 field, the value provided in the PrimaryAddressLine1 field is written to the primary address field based on the Country value provided in the request. If a value is provided for both the PrimaryAddressLine1 field and the primary address field (for example, County) for the specified country, the value in the PrimaryAddressLine1 field is respected and the value in the primary address field is ignored. This is shown in the following table.
Field Name | SOAP Request | Value Written to DB |
---|---|---|
Country |
Togo |
Togo |
County |
BP 128 |
1 Main Street |
Street Address 1 |
Not applicable |
None |
PrimaryStreetAddress1 |
1 Main Street |
None |
In the case where only a PrimaryAddressLine1 value is submitted, this value is written to the mapped field in the DB as shown in the following table.
Field Name | SOAP Request | Value Written to DB |
---|---|---|
Country |
Togo |
Togo |
County |
Not applicable |
1 Main Street |
Street Address 1 |
Not applicable |
None |
PrimaryStreetAddress1 |
1 Main Street |
None |
Objects Supporting the PrimaryAddressLine1 Field
The PrimaryAddressLine1 field is available on a number of objects accessible through the Web Services v2.0 interface as shown in the following tables.
Object Name | Fields |
---|---|
Account |
BillingPrimaryAddressLine1, ShippingPrimaryAddressLine1 |
Contact |
PrimaryAddressLine1, AlternateAddressLine1 |
Lead |
BillingPrimaryAddressLine1 |
Parent Object Name | Child Object Name | Fields |
---|---|---|
Account |
Address |
Not applicable |
Account |
Contact |
Not applicable |
Contact |
Address |
PrimaryAddressLine1 |
Contact |
Lead |
BillingPrimaryAddressLine1 |