Example: Deleting ATP inventory configuration

We can delete your ATP inventory configuration using the Data Load utility. This example uses a CSV file to demonstrate how to delete your ATP inventory configuration information.

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.

Use the Data Load utility to delete ATP inventory configuration data from the database.


CSV file with sample ATP inventory configuration data

In this example the data source is a CSV file named ATPconfig_delete.csv. The file contains sample ATP inventory configuration data with minimum columns that are necessary for "delete" dataLoadMode. Each column is delimited by a comma.

CatalogEntryMediator is used to delete catalog entry data together with ATP inventory configuration data. FulfillmentPropertyMediator is used to delete ATP inventory configuration data only, with no impact to corresponding catalog entry data.

CSV file with sample data

PartNumber ParentPartNumber Type CatEntryStoreIdentifier
Example-PN-10001 Product 10701
Example-PN-100012 Example-PN-10001 Item

Note: If "markForDelete" property is set as true in business object configuration file, the BASEITEM record and ITEMSPC record are not deleted from database. The MARKFORDELETE value of these records is updated to "1" instead.Any value other than true automatically defaults to false. Records in table BASEITEM and ITEMSPC are deleted from database and corresponding records in other tables are also deleted as a result of the Cascade restriction. For example, when a BASEITEM record is deleted, the corresponding BASEITMDSC record is deleted.


CSV column and XML element definitions

Other optional fields not included in the example:


Business context data

The following code snippet from the wc-dataload-env.xml configuration file provides the business context data necessary for loading the data:


Mapping data

The following snippet from the sample configuration file demonstrates how to map each column of data in the source CSV file to a value

The following snippet from the sample configuration file demonstrates how to map each column of the data in the CSV file to a business object logical schema path. The attribute 'value' represents the name of a column of the CSV file that is defined in the configuration snippet. Each column in the CSV file must have a mapping to the logical schema path.


Business object mediator

The Data Load utility provides a business object mediator for deleting ATP inventory configuration data together with catalog entry data. The mediator class name is com.ibm.commerce.catalog.dataload.mediator.CatalogEntryMediator. For deleting inventory configuration data only, the mediator class name is com.ibm.commerce.catalog.dataload.mediator.FulfillmentPropertyMediator

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.