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


Example: Catalog entry defining attributes

You can use the data load utility to insert, replace, or delete multiple defining attributes for products at the same time. Defining attributes apply to products only. SKUs, bundles, and kits cannot have defining attributes.


CSV file column definitions

PartNumber

(Mandatory, String) The catalog entry identifier (product). This field is mandatory (cannot be NULL) and it must be unique. Either this field or the CatalogEntryUniqueId is mandatory.

CatalogEntryUniqueId

(Mandatory, BigInt) The internal unique reference number of the catalog entry (product). Either this field or the PartNumber is mandatory.

Type

(String) The data type of the attribute, such as string, integer or float. This filed is mandatory and cannot be NULL.

Name

(String) The name of this attribute. This field is language sensitive.

Sequence

(Double) A sequence number used to control the order in which attributes are displayed in a product. This value cannot be NULL. The default value = 0.

Description

(String) A description of this attribute. This field is language sensitive.

SecondaryDescription

(String) A secondary description of this attribute. This field is language sensitive.

GroupName

(String) The name of the attribute group this attribute belongs to.

Field1

(String) A customizable field for this attribute.

Footnote

(String) Additional attribute data such as a footnote.

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.


CSV file with sample catalog entry defining attribute data


Insert or replace

This file contains sample products with defining attributes. As SKUs, bundles and kits cannot have defining attributes, these catalog entry types are not included in the sample CSV file. CSV file with sample catalog entry defining attribute data. Due to the large amount of fields in the CSV file, the table has been split into 2 sections:

Formatted CSV file with column headings
PartNumber Type Name Sequence Description
Example-PN-10001 String Color 1 The color of the item
Example-PN-10002 String Size 2 The size of the item

Formatted CSV file with column headings - continued
SecondaryDescription GroupName Field1 Footnote
  Clothing A A
  Clothing B B


Delete

This file contains sample catalog entry defining attributes that will be deleted: CSV file with sample catalog entry defining attribute data.

Formatted CSV file with column headings
PartNumber Type Name Sequence Description
Example-PN-10001 String Color 1 The color of the item
Example-PN-10002 String Size 2 The size of the item

Formatted CSV file with column headings - continued
SecondaryDescription GroupName Field1 Footnote Delete
  Clothing A A 1
  Clothing B B 1


Map data

The following code snippet from the catalog entry defining attributes 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" valueFrom="InputData"/>     <_config:mapping xpath="CatalogEntryIdentifier/UniqueID" value="CatalogEntryUniqueId" valueFrom="InputData"/>     <_config:mapping xpath="CatalogEntryAttributes/Attributes[0]/AttributeIdentifier/UniqueID" value="AttributeUniqueId" valueFrom="InputData"/>     <_config:mapping xpath="CatalogEntryAttributes/Attributes[0]/AttributeDataType" value="Type" valueFrom="InputData" />     <_config:mapping xpath="CatalogEntryAttributes/Attributes[0]/Name" value="Name" valueFrom="InputData" />     <_config:mapping xpath="CatalogEntryAttributes/Attributes[0]/usage" value="Defining" valueFrom="Fixed" />     <_config:mapping xpath="CatalogEntryAttributes/Attributes[0]/displaySequence" value="Sequence" valueFrom="InputData" />     <_config:mapping xpath="CatalogEntryAttributes/Attributes[0]/Description" value="Description" valueFrom="InputData" />     <_config:mapping xpath="CatalogEntryAttributes/Attributes[0]/ExtendedData/SecondaryDescription" value="SecondaryDescription" valueFrom="InputData" />     <_config:mapping xpath="CatalogEntryAttributes/Attributes[0]/ExtendedData/DisplayGroupName" value="GroupName" valueFrom="InputData" />     <_config:mapping xpath="CatalogEntryAttributes/Attributes[0]/ExtendedData/Field1" value="Field1" valueFrom="InputData" />     <_config:mapping xpath="CatalogEntryAttributes/Attributes[0]/ExtendedData/Footnote" value="Footnote" valueFrom="InputData" />     <_config:mapping xpath="CatalogEntryAttributes/Attributes[0]/ExtendedData/UnitOfMeasure" value="UnitOfMeasure" valueFrom="InputData" />     <_config:mapping xpath="" value="Delete" valueFrom="InputData" 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 CatalogEntryAttributeMediator.


+

Search Tips   |   Advanced Search