Samples > Data load utility samples > Examples: Mapping data > Examples: Mapping catalog data > Examples: Mapping catalog entry data
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 shown, deletes the components from multiple kits and bundles. The kit and bundle is not deleted.
CSV file column definitions
- PartNumber
- Required: (String) The unique part number of this bundle or kit. This field is mandatory (cannot be NULL) and it must be unique.
- Sequence
- (Double) An optional number 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
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 associated with the kit or bundle.
- Delete
- (String) Indicates whether to delete. If you are performing a delete operation, specify this column. A value of "1", indicates that the row should be deleted.
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 replaceIn this example, the CSV file contains sample kit and bundle data. CSV file with sample kit and bundle data.
Formatted CSV file with column headings
PartNumber Sequence ChildPartNumber ChildStoreIdentifier Type Quantity 230092 1 430092 1001 BundleComponent 2 230093 2 430093 2001 DynamicKitComponent 7
DeleteIn 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.
Formatted CSV file with column headings
PartNumber Sequence ChildPartNumber ChildStoreIdentifier Type Quantity Delete 230092 1 430092 1001 BundleComponent 2 1 230093 2 430093 2001 DynamicKitComponent 7 1
Map data
The following code snippet from the catalog entry kits and bundles loader configuration file demonstrates how to map each value to a business object logical schema path.
<_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 are performing 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 CatalogEntryKitComponentMediator.