Example: Kits and bundles
Use the Data Load utility to insert, replace, or delete multiple kits and bundles simultaneously. Products, bundles, and kits cannot be part of kit components. Only SKUs are included as part of kit components. An example that is shown, deletes the components from multiple kits and bundles. The kit and bundle is not deleted.
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 bundle or kit. This field is required (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 that is used to control the order in which the child catalog entries appear under the parent kit or bundle.
- ChildPartNumber
- (String) The catalog entry identifier of the child catalog entry of the bundle or kit.
- ChildStoreIdentifier
- (String) The identifier of the store the child catalog entry belongs to.
- Type
- Optional: (String) The type of relationship.
- PackageComponent
- BundleComponent
- DynamicKitComponent
Note: This field is optional, however it is recommended that you provide this field in the CSV file to optimize data load performance. If this field is not provided, the Data Load utility retrieves the catalog entry type from the database. Depending on the catalog entry type, the corresponding relationship type is created. - Quantity
- (Double) The quantity of catalog entries that are associated with the kit or bundle.
- Delete
- (String) A flag indicating whether to delete. Specify
1
to delete the row.
Other optional fields not included in the example are:
- StoreIdentifier
- (String) The identifier of the store the bundle or kit belongs to.
- 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 kit and bundle data
Insert or replace
In this example, the CSV file contains sample kit and bundle data. CSV file with sample kit and bundle data.
PartNumber | Sequence | ChildPartNumber | ChildStoreIdentifier | Type | Quantity |
---|---|---|---|---|---|
230092 | 1 | 430092 | 1001 | BundleComponent | 2 |
230093 | 2 | 430093 | 2001 | DynamicKitComponent | 7 |
Delete
In this example, the CSV file contains sample kit and bundle data that is deleted. Each column is delimited by a comma. CSV file with sample kit and bundle data.
PartNumber | Sequence | ChildPartNumber | ChildStoreIdentifier | Type | Quantity | Delete |
---|---|---|---|---|---|---|
230092 | 1 | 430092 | 1001 | BundleComponent | 2 | 1 |
230093 | 2 | 430093 | 2001 | DynamicKitComponent | 7 | 1 |
Mapping data
<_config:DataMapping>
<_config:mapping xpath="CatalogEntryIdentifier/ExternalIdentifier/PartNumber" value="PartNumber" />
<_config:mapping xpath="KitComponent/displaySequence" value="Sequence" />
<_config:mapping xpath="KitComponent/CatalogEntryReference/CatalogEntryIdentifier/ExternalIdentifier/PartNumber" value="ChildPartNumber" />
<_config:mapping xpath="KitComponent/CatalogEntryReference/CatalogEntryIdentifier/ExternalIdentifier/StoreIdentifier/ExternalIdentifier/NameIdentifier" value="ChildStoreIdentifier" />
<_config:mapping xpath="KitComponent/kitComponentCodeType" value="Type" />
<_config:mapping xpath="KitComponent/quantity" value="Quantity" />
<_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.CatalogEntryKitComponentMediator.