Adding and Updating Account Addresses

The information in this topic is applicable when the Enable Shared Addresses check box in the company profile is deselected, that is, when addresses are not shared.

Note: When Enable Shared Addresses is selected, the address child object, (<ListOfAddress>) cannot be used, and instead the shared address child object (<ListOfSharedAddress>) must be used to associate or dissociate addresses and flag addresses as billing, shipping, or primary addresses. For more information about the shared address child object, see Shared Address and for more information about the address child object, see Address.

The account object has three types of address:

  1. Billing address

  2. Shipping address

  3. Simple address

The billing and shipping address correspond to fields in the account object. The address child object can correspond to a simple address, but might also correspond to a billing address or a shipping address.

You can use either AccountInsert, AccountUpdate or AccountExecute calls to insert or update billing and shipping addresses for an account. With AccountInsert or AccountUpdate calls, the account parent node with billing and shipping address fields must be present and there must not be any child node. If an address child is present, only a simple address can be added, and not billing and shipping addresses. If the address child or any other child node is not present, only billing and shipping addresses can be added, and not simple addresses.

With the AccountExecute call, both the account parent node and address child node can be present along with billing and shipping address fields at the parent level.

To distinguish whether the address in an address child node is a billing or shipping address:

  • If the PrimaryBillToAddressId and AddressId fields have the same value, then the address is a billing address.

  • If the PrimaryShipToAddressId and AddressId have the same values, the address is a shipping address.

Note: 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. For more information, see Mapping Primary Address Fields Using Web Services.