You should have a strong knowledge of the data and data structure to be imported. You can load data through:
SQL/ETL Load: Create scripts or use tools to extract the source information, transform the values to meet the data requirements of the interface tables, and populate the interface tables with large volumes of information. See: Bulk Import Interface Tables, Oracle Trading Community Architecture Reference Guide.
D&B Load: Use the standard D&B bulk file that you receive from D&B and run the D&B Import Adapter request set to automatically map and load the D&B information into the interface tables. See: D&B Import Adapter and Batch Loading.
File Load: Use Oracle Customers Online (OCO) or Oracle Customer Data Librarian (CDL) to load data from a comma-separated value (CSV) file, or file delimited by another allowed character, into the interface tables. See: File Loads Overview.
A set of data to be loaded into the TCA Registry at one time is called a batch. The data in one batch must be from the same data source. The interface tables can store as many batches from different sources as needed, and any number of batches can be actively populating the interface tables at the same time. However, if a D&B import batch is being loaded into the interface tables, using the D&B Import Adapter request set, the tables are locked and all other batches must wait until the D&B batch is completed. The request set uses direct inserts into the interface tables, which requires table-level locks.
Note: When the request set is running, you also cannot run the Import Batch to TCA Registry program to transfer any batch from the interface tables into the TCA Registry.
Each import batch must have a batch ID. Use the create batch procedure from the Create Import Batch API to guarantee that a unique batch ID is assigned.
Call the following script to create a batch ID:
Set serveroutput on;
DECLARE
x_batch_id NUMBER;
x_return_status VARCHAR2(4000);
x_msg_count NUMBER;
x_msg_data VARCHAR2(4000);
BEGIN
hz_imp_batch_summary_v2pub.create_import_batch(NULL,'&batchname','&batchdescription',
'&ORIGSYS','&loadtype',12,x_batch_id,x_return_status,x_msg_count,x_msg_data);
dbms_output.put_line(SubStr('x_batch_id = '||TO_CHAR(x_batch_id), 1, 255));
dbms_output.put_line(SubStr('x_return_status = '||x_return_status,1,255));
dbms_output.put_line(SubStr('x_msg_count = '||TO_CHAR(x_msg_count), 1, 255));
dbms_output.put_line(SubStr('x_msg_data = '||x_msg_data,1,255));
COMMIT;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line(SubStr('Error '||TO_CHAR(SQLCODE)||': '||SQLERRM, 1, 255));
RAISE;
END;
See: Create Import Batch API, Oracle Trading Community Architecture Technical Implementation Guide.
You must provide a unique ID for each record in the interface table. The unique ID is a combination of:
The source system code, defined through Source System Management (SSM) administration, which identifies the source that the imported data comes from
The source ID, which identifies the record in the source system
In the HZ_PARTIES, HZ_PARTY_SITES, HZ_CONTACT_POINTS, and HZ_ORG_CONTACTS tables, these unique IDs are treated as source IDs for Source System Management. In other tables that do not support SSM, the ID is treated as a logical key. See: Source Systems Overview.
These IDs serve to link:
Details of each party together, as foreign key references among interface tables.
The data in the source system, now in the interface tables, to the target TCA tables, for making updates to existing parties in the Registry from the same source data. See: Matching Records with Source System Management.
You should maintain all unique IDs locally in your system, and use them in the future to update specific information in the TCA Registry.
If you plan to use Customer Interface to import accounts that are associated with the imported parties, you must ensure that the source ID alone is unique across all source systems. Customer Interface uses only source IDs, not source system codes, so the imported account must have a unique source ID to link to the corresponding imported party.
For example, if you are importing a party and do not plan to import associated accounts, you pass for the imported party:
Source system code: MKT
Source ID: 141442
You only need to ensure that this combination is unique across all source systems. If you are importing a party and plan to import associated accounts, then you pass for the imported party:
Source system code: MKT
Source ID: MKT141442
You can concatenate the source system code and source ID values to use as the source ID for the party, or implement your own system to ensure that the source IDs alone are unique across all source systems. When you load the accounts with Customer Interface, you would pass the MKT141442 source ID to associate the accounts with the imported party. See: Customer Interface.
Through import, you either insert new records into the Registry or update existing TCA records. An update means that the imported information, if not null, completely overwrites all values in the corresponding TCA record.
All records inserted into the TCA tables are assumed to be active.
You can update TCA Registry records of any status through import, but you cannot change the status value itself during import.
The matching phase of the import process determines whether the interface table record is an insert or update. See: Matching Records with Source System Management.
You can use the optional INSERT_UPDATE_FLAG column in the interface tables for insert or update protection: I for insert and U for update. The system matching must align with the action in this column. If not, the record is marked with error and not loaded into TCA. If the column is left blank, the system matching alone decides between insert or update for each record.
If the HZ: Use Data Sharing and Security During Import profile option is set to Yes, then the import process invokes Data Sharing and Security (DSS) each time that a TCA record is updated. DSS provides additional security against update and is enabled for these tables involved in import:
HZ_CONTACT_POINTS
HZ_CODE_ASSIGNMENTS
HZ_PARTIES
HZ_PARTY_SITES
HZ_RELATIONSHIPS
See: Data Sharing and Security Overview.
If the HZ: Validate Flexfields During Import profile option is set to Yes, then flexfield validation also applies to inserts and updates for these tables:
HZ_CONTACT_POINTS
HZ_LOCATIONS
HZ_PARTIES
HZ_RELATIONSHIPS
When a record in the interface table is designated to update an existing record upon import, any null values in that record would not update the TCA value. The existing value in TCA remains the same after import. You are not required to pass values in all interface table columns when values are optional and not available from a given source system.
If you want to intentionally overwrite a TCA value with NULL, you must pass a specific value, as defined in these profile options:
HZ: Character Value to Indicate NULL During Import
HZ: Date Value to Indicate NULL During Import
HZ: Numeric Value to Indicate NULL During Import
For example, the HZ: Date Value to Indicate NULL During Import profile option is set to 01-01-4000, and a record in the TCA Registry currently has an end date of 02-02-2005. If you want to update the date with a null value, then you must pass 01-01-4000 for that column.
The PARTY_NUMBER and PARTY_SITE_NUMBER columns in the TCA tables must contain unique values.
If values for these columns are passed in the interface tables, the import process checks for the uniqueness during the import.
If unique, the values are accepted.
If not unique, the record fails with a unique index error.
If no values for these columns are passed, the import process generates values from an internal sequence.
If the sequence numbers are unique, the values are accepted.
If not unique, the record fails with a unique index error.
You should maintain one of these strategies:
Always pass values for these columns so that the import process does not have to generate sequence numbers.
Never pass values for these columns so that the generated sequence numbers would not conflict with existing values in the Registry.
Primary flags indicate which record is the primary one when multiple records exist. For example, if a party has multiple bill-to addresses, the main bill-to address is marked as primary.
Primary flags are exposed in these interface tables, which correspond to TCA tables that contain primary flags:
HZ_IMP_ADDRESSES_INT
HZ_IMP_ADDRESSUSES_INT
HZ_IMP_CLASSIFICS_INT
HZ_IMP_CONTACTPTS_INT
If a new party is inserted through import, you can define primary flags for any of the above child entities.
If an existing party in the Registry do not have any contact points and is being updated with one or more contact points, you can mark one of the imported contact points as primary. If you do not specify any of the new records as primary, the import process marks one at random. If you mark more than one record as primary, the import process will pick one of the marked records at random.
If the party already has an existing address, contact point, address use, or classification, then you cannot change the primary status through import. Even if you pass a value in the PRIMARY_FLAG column of the interface table, the value is ignored. You can only change primary statuses through a user interface or APIs.