Example: Catalog entry descriptions
You can use the Data Load utility to replace, or delete catalog entry descriptions. These examples use a CSV file to demonstrate how to replace, or delete multiple catalog entry descriptions.
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 catalog entry identifier. 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.
- Language_ID
- (String) The language id for language sensitive fields (Name, ShortDescription, LongDescription, Thumbnail, FullImage, Published, and Keyword). For example: -1 – English, -2 – French
- Name
- (Required, String) The display name of this PartNumber. This field is language sensitive.
- ShortDescription
- (String) A short description of this catalog entry. This field is language sensitive.
- LongDescription
- (String) A long description of this catalog entry. This field is language sensitive.
- Thumbnail
- (String) The thumbnail image path of this catalog entry. This
field is language sensitive. The forward slash '/' must be used in
the path. Do not use backward slash '\'. For example,
images/G1.jpg
. - FullImage
- (String) The full image path of this catalog entry. This field
is language sensitive. The forward slash '/' must be used in the path.
Do not use backward slash '\'. For example,
images/G1.jpg
. - AuxDescription1
- (String) An auxiliary long description of this catalog entry. This field is language sensitive.
- AuxDescription2
- (String) An auxiliary description of this catalog entry. This field is language sensitive.
- Available
- (Integer) Indicates the length of time to availability of this catalog entry. Do not use this column to indicate inventory levels. Default value = 1.
- Published
- (Integer) Indicates whether this catalog entry must be displayed. : 0 = catalog entry must not be displayed, 1= catalog entry must be displayed.
- AvailabilityDate
- (Timestamp) The date this catalog entry becomes available.
- Keyword
- (String) A keyword that is used for searching. To include multiple
keywords, which are separated by commas, include the entire string
in double quotation marks. Example
"keyword 1, keyword 2, keyword3"
. This field is language sensitive. - Delete
- (String) A flag indicating whether to delete. Specify
1
to delete the row.
CSV file with sample catalog entry description data
Replace
In this example, the data source is a CSV file. The file contains sample catalog entry descriptions. CSV file with sample catalog entry description data.
PartNumber | Language_ID | Name | ShortDescription | LongDescription |
---|---|---|---|---|
Example-PN-10001 | -1 | 200-watt microwave | 200-watt microwave short description | 200-watt microwave long description |
Example-PN-10002 | -1 | 150-watt microwave | 150-watt microwave short description | 150-watt microwave long description |
Thumbnail | FullImage | AuxDescription1 | AuxDescription2 |
---|---|---|---|
200_microw_thumb/image.jpg | 200_microw_full/image.jpg | 200-watt microwave auxiliary description 1 | 200-watt microwave auxiliary description 2 |
150_microw_thumb/image.jpg | 150_microw_full/image.jpg | 150-watt microwave auxiliary description 1150-watt microwave auxiliary description 2 | 200-watt microwave |
Available | Published | AvailabilityDate | Keyword |
---|---|---|---|
1 | 1 | 20/4/2008 | 200-watt microwave keyword |
0 | 1 | 20/4/2008 | 150-watt microwave keyword |
Delete
In this example, the CSV file contains sample catalog entry descriptions only the required fields are shown in the sample. CSV file with sample catalog entry description data.
PartNumber | Language_ID | Delete |
---|---|---|
Example-PN-10001 | -1 | 1 |
Example-PN-10002 | -1 | 1 |
Mapping data
<_config:DataMapping>
<_config:mapping xpath="CatalogEntryIdentifier/ExternalIdentifier/PartNumber" value="PartNumber" />
<_config:mapping xpath="Description[0]/language" value="Language_ID" />
<_config:mapping xpath="Description[0]/Name" value="Name" />
<_config:mapping xpath="Description[0]/ShortDescription" value="ShortDescription" />
<_config:mapping xpath="Description[0]/LongDescription" value="LongDescription" />
<_config:mapping xpath="Description[0]/Thumbnail" value="Thumbnail" />
<_config:mapping xpath="Description[0]/FullImage" value="FullImage" />
<_config:mapping xpath="Description[0]/Attributes/auxDescription1" value="AuxDescription1" />
<_config:mapping xpath="Description[0]/Attributes/auxDescription2" value="AuxDescription2" />
<_config:mapping xpath="Description[0]/Attributes/available" value="Available" />
<_config:mapping xpath="Description[0]/Attributes/published" value="Published" />
<_config:mapping xpath="Description[0]/Attributes/availabilityDate" value="AvailabilityDate_LocaleSpecific" />
<_config:mapping xpath="Description[0]/Keyword" value="Keyword" />
<_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.CatalogEntryDescriptionMediator.