Samples > Data load utility samples > Examples: Mapping data > Examples: Mapping catalog data > Examples: Mapping catalog entry data


Example: Catalog entry merchandising associations

You can use the data load utility to replace, or delete multiple catalog entry merchandising associations at the same time.


CSV file column definitions

PartNumber

(Mandatory, String) The unique part number used to identify the source catalog entry in the association. This field cannot be null.

AssociationType

(Mandatory, String) The type of merchandising association you want to use. The available values are CrossSell, UpSell, Accessory, and Replacement. This field cannot be null.

TargetPartNumber

(Mandatory, String) The unique part number used to identify the target catalog entry in the association. This field cannot be null.

TargetStoreIdentifier

(String) The unique identifier of the store the target catalog entry belongs to. If the TargetStoreIdentifier is not provided in the CSV source file, then the StoreIdentifier in the context data will be used.

Sequence

(Decimal) The order in which the merchandising associations are displayed.

SemanticSpecifier

(Mandatory, String) The semantic specifier of the merchandising association. Examples of semantic specifiers are comes_with, none, requires, or temp. This field cannot be null.

Quantity

(double) The quantity of target catalog entries associated to the source. For example, if the source catalog entry is a camera, and the target catalog entry is the type of battery it uses, the quantity indicates the number of batteries required.

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:

Field1

(String) A user defined field available for merchandising association customization purposes.

Field2

(Integer) A user defined field available for merchandising association customization purposes.

Field3

(Decimal) A user defined field available for merchandising association customization purposes.

Date1

(Timestamp) A user defined field available for merchandising association customization purposes.


CSV file with sample catalog entry merchandising associations


Insert or replace

In this example, the CSV file contains sample catalog entry merchandising association data. Each column is delimited by a comma. CSV file with sample catalog entry merchandising association data.

Formatted CSV file with column headings.
PartNumber AssociationType TargetPartNumber TargetStoreIdentifier Sequence SemanticSpecifier Quantity
Example-PN-10001 UpSell Example-PN-10004 ExampleTargetB2BStore 1 NONE 23
Example-PN-10002 Accessory Example-PN-10005 ExampleTargetB2BStore 2 NONE 11


Delete

In this example, the CSV file contains sample catalog entry merchandising association data that will be deleted. CSV file with sample catalog entry merchandising association data.

Formatted CSV file with column headings.
PartNumber AssociationType TargetPartNumber TargetStoreIdentifier Sequence SemanticSpecifier Quantity Delete
Example-PN-10001 UpSell Example-PN-10004 ExampleTargetB2BStore 1 NONE 23 1
Example-PN-10002 Accessory Example-PN-10005 ExampleTargetB2BStore 2 NONE 11 1


Map data

The following snippet from the sample catalog entry association 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="Association/Name" value="AssociationType" />     <_config:mapping xpath="Association/CatalogEntryReference/CatalogEntryIdentifier/ExternalIdentifier/PartNumber" value="TargetPartNumber" />     <_config:mapping xpath="Association/CatalogEntryReference/CatalogEntryIdentifier/ExternalIdentifier/StoreIdentifier/ExternalIdentifier/NameIdentifier" value="TargetStoreIdentifier" />     <_config:mapping xpath="Association/displaySequence" value="Sequence" />     <_config:mapping xpath="Association/semantic" value="SemanticSpecifier" />     <_config:mapping xpath="Association/quantity" value="Quantity" />     <_config:mapping xpath="Association/Attributes/field1" value="Field1" />     <_config:mapping xpath="Association/Attributes/field2" value="Field2" />     <_config:mapping xpath="Association/Attributes/field3" value="Field3" />     <_config:mapping xpath="Association/Attributes/date1" value="Date1" />     <_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 CatalogEntryAssociationMediator.


+

Search Tips   |   Advanced Search