Example: Relationship data for SKUs and products
Use the Data Load utility to efficiently replace, or delete existing relationship data between multiple products and SKUs.
This example uses a CSV file to demonstrate how to insert, replace, or delete your data. You 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
- PartNumber
- Required: (String) The unique part number of this catalog entry. This field is cannot be NULL and it must be unique. The part number for a catalog entry displays in Management Center as the value for the catalog entry Code property.
- Sequence
- (Double) An optional number used to control the order in which the items appear under the parent product.
- ParentPartNumber
- Required: (String) The catalog entry identifier of the parent product of the SKU.
- Delete
- (String) A flag indicating whether to delete. Specify
1
to delete the row.
Other optional fields not included in the example are:
- ParentToChildCatEntryRelField1
- (String) A user-defined field available for customization of the parent product to child SKU relationship.
- ParentToChildCatEntryRelField2
- (Integer) A user-defined field available for customization of the parent product to child SKU relationship.
- ParentToChildCatEntryRelField3
- (Double) A user-defined field available for customization of the parent product to child SKU relationship.
CSV file with sample product and SKU relationship data
Replace
PartNumber | Sequence | ParentPartNumber |
---|---|---|
230092 | 1 | 3004 |
230093 | 2 | 3004 |
Delete
In this example, the CSV file contains sample SKU and product relationship data that get deleted. CSV file with sample product and SKU relationship data.
PartNumber | Sequence | ParentPartNumber | Delete |
---|---|---|---|
230092 | 1 | 3004 | 1 |
230093 | 2 | 3004 | 1 |
Mapping data
<_config:DataMapping>
<_config:mapping xpath="CatalogEntryIdentifier/ExternalIdentifier/PartNumber" value="PartNumber" />
<_config:mapping xpath="ParentCatalogEntryIdentifier/ExternalIdentifier/PartNumber" value="ParentPartNumber" />
<_config:mapping xpath="displaySequence" value="Sequence" />
<_config:mapping xpath="" value="Delete" deleteValue="1"/>
</_config:DataMapping>
If you perform an insert or
replace operation, do not specify the "Delete" column in the CSV file
or you can leave the "Delete" column empty.Business object mediator
The mediator class name is com.ibm.commerce.catalog.dataload.mediator.CatalogEntryParentProductMediator.