How to create a new customer during Order Import


Order Management provides the capability to add a new customer, the address and contacts using the Order Import feature.

The table OE_CUSTOMER_INFO_IFACE_ALL needs to be populated for this to occur. 
Based on the data available in the OE_HEADERS_IFACE_ALL the data from the table OE_CUSTOMER_INFO_IFACE_ALL will be processed to add a new customer.
This table can also be used to import a new address only or contact information of an existing Customer.

The link between the header interface record and the customer interface record is made through the column CUSTOMER_INFO_REF of the table OE_CUSTOMER_INFO_IFACE_ALL. The link depends on the CUSTOMER_INFO_TYPE_CODE. When the order import is used to create a new customer (new account/address/contact etc), the CUSTOMER_INFO_TYPE_CODE should be either ('ACCOUNT', 'ADDRESS', or 'CONTACT') to denote the type of information in the record. Hence a new Account (CUSTOMER_INFO_TYPE_CODE -> ACCOUNT) can be added to the current Customer (CURRENT_CUSTOMER_ID).

The OE_CUSTOMER_INFO_IFACE_ALL table needs to be populated. The number of records being populated will depend on what is being imported. For example while importing only the customer account only one record will be populated and while importing account, address and contacts three or more records will be populated.

If the customer addresses are to be different for ship, bill, and deliver, then three different records need to be populated. Whether an address is for ship, bill, or deliver, is decided by the following columns of the OE_CUSTOMER_INFO_IFACE_ALL table:

* IS_SHIP_TO_ADDRESS,
* IS_BILL_TO_ADDRESS,
* IS_DELIVER_TO_ADDRESS.

These columns take the values 'Y', 'N' or null. So if the particular record needs to be only a bill to address, then the IS_BILL_TO_ADDRESS should be set as 'Y' and the rest as 'N' or null. If the same address needs to be Bill to, ship to and deliver to Address then the flag should be set as 'Y' against all the three columns.

The link between the Account record and the address or contact record is through the column PARENT_CUSTOMER_REF. This should be populated in the address or contact record with the CUSTOMER_INFO_REF of the account record.

Note, the OE_CUSTOMER_INFO_IFACE_ALL table (used for adding Customer/Address/Contact information) is the only table from above that does not have an ORDER_SOURCE_ID column. A link between the order header record is made through the column CUSTOMER_INFO_REF of the table OE_CUSTOMER_INFO_IFACE_ALL and a column in the OE_HEADERS_IFACE_ALL table.


Also notice that to create a new Customer and Party within the Trading Community Architecture, the profile option 'HZ: Generate Party Number' should be set to 'YES' (updateable at Site, Application and responsibility levels).