Example: Organization

Use the Data Load utility to load organization data into the WebSphere Commerce database.

This example uses a CSV file to demonstrate how to insert, replace, or delete your data. We can also create and use an XML formatted file to insert, replace, or delete your data. If you choose to create and use an XML formatted file, ensure that your XML elements use the same names as are used for CSV column names.


CSV column and XML element definitions


CSV file with sample organization data

In this example, the CSV file contains sample organization data.

CSV file with sample organization data. Due to the large number of fields in this CSV file, the following table is split into two sections:

Formatted CSV file with column headings
orgEntityName parentDN orgEntityType status administratorLastName administratorFirstName administratorMiddleName
Sample Organization o=seller organization,o=root organization Organization Unlocked Redmond Sam Arnold
HR Department o=sample organization,o=seller organization,o=root organization OrganizationUnit Locked Personnel Susan Amy
Retail Department o=sample organization,o=seller organization,o=root organization OrganizationUnit Hall Mary Patricia

Formatted CSV file with column headings
address1 address2 address3 city state country zip code
1 Sample Way Toronto ON CA M1M 1W1
42 Sample Way Toronto ON CA M1M 1W1
42 Sample Way Toronto ON CA M1M 1W1


Mapping data

The following code snippet from the wc-loader-organization.xml configuration file demonstrates how to map each value to a business object logical schema path.


Business object mediator

The mediator class name is OrganizationMediator.

Note: When we use a mediator that is provided with WebSphere Commerce with the Data Load utility, the utility assumes that we are loading data for all columns for a business object. To update the data in only specific columns, configure a column exclusion list for the load process. A column exclusion list causes the Data Load utility to ignore specific columns during the load operation. If you do not use a column exclusion list, the utility updates all columns in the row of a database table row when the utility updates the row. If no value is set in the input file, the utility can replace the existing column value with a default value or set the value to be null. See Configure a column exclusion list.