Oracle Web Services On Demand Guide > Overview of Web Services On Demand > Field Types Supported by Oracle CRM On Demand >

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. Table 6 and Table 7 show the mapping for the PrimaryAddressLine1 field depending on the selected Country value.

NOTE:  The actual name of the PrimaryAddressLine1 fields varies with the record type as shown in Objects Supporting the PrimaryAddressLine1 Field.

Table 6. PrimaryAddressLine1 To Address Field Mapping by Country
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 Table 7

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 Table 7

County

County

Bill To County

Ship To County

Personal County

Primary County

Group C

See Table 7

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

Table 7. Groups of Countries with Different Address Field Mappings
Group
Countries

A

United States and all other countries apart from those in groups B and C, and those mentioned in Table 6.

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, Ethiopia, Gabon, Ghana, Guinea, Ivory Coast, Kenya, Lesotho, Malawi, Mauritania, Namibia, Niger, Niue, Oman, Puerto Rico, Rwanda, Seychelles, Solomon Islands, Swaziland, 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 Table 8.

Table 8. Value specified for PrimaryAddressLine1 and Primary Address Field
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 Table 9.

Table 9. Value specified for PrimaryAddressLine1 only
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 Table 10 and Table 11.

Table 10. Parent Objects on Which the PrimaryAddressLine1 field is available
Object Name
Fields

Account

BillingPrimaryAddressLine1, ShippingPrimaryAddressLine1

Contact

PrimaryAddressLine1, AlternateAddressLine1

Lead

BillingPrimaryAddressLine1

Table 11. Child Objects on Which the PrimaryAddressLine1 field is available
Parent Object Name
Child Object Name
Fields

Account

Address

Not applicable

Account

Contact

Not applicable

Contact

Address

PrimaryAddressLine1

Contact

Lead

BillingPrimaryAddressLine1

Oracle Web Services On Demand Guide, Version 25.0 (Oracle CRM On Demand Release 37) Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices.