Sample business object configuration file for EPCMF data
If you are adding or changing the catalog entry
attributes in the EPCMF file, you should be familiar with the XML
in the business object configuration file,
wc-dataextract-catalog-entry.xml
. The
following XML code is the sample wc-dataextract-catalog-entry.xml file
that WebSphere Commerce provides. The sections that are labeled with
blue callouts are described beneath the sample.<_config:DataloadBusinessObjectConfiguration xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation = "http://www.ibm.com/xmlns/prod/commerce/foundation/config ../xsd/wc-dataload-businessobject.xsd"
xmlns:_config = "http://www.ibm.com/xmlns/prod/commerce/foundation/config">
1
<_config:DataLoader className = "com.ibm.commerce.foundation.dataload.BusinessObjectExtractor">
2
<_config:DataReader className = "com.ibm.commerce.catalog.dataload.datareader.CatalogEntryReaderMediator" pageSize = "700">
<_config:property name = "clientId" value = "99999999"/>
<_config:property name = "storeId" value = "10001, 10101"/>
<_config:property name = "username" value = "wcsadmin"/>
<_config:property name = "password" value = "3fdBFMFoiGNQ0zUStB865w=="/>
<_config:property name = "accessProfile" value = "IBM_Admin_DataExtract"/>
</_config:DataReader>
3
<_config:BusinessObjectBuilder className = "com.ibm.commerce.foundation.dataload.businessobjectbuilder.BaseExtractBusinessObjectBuilder"
packageName = "com.ibm.commerce.catalog.facade.datatypes.CatalogPackage"
dataObjectType = "CatalogEntryType">
4
<_config:DataMapping>
a<_config:mapping xpath = "CatalogEntryIdentifier/ExternalIdentifier/PartNumber" value = "Item ID"/>
b<_config:mapping xpath = "Description[0]/Name" value = "Item Name"/>
c<_config:mapping xpath = "ParentCatalogGroupIdentifier/UniqueID" value = "Items Primary Category ID"/>
d<_config:mapping xpath = "Description[0]/ShortDescription" value = "Static Attribute 1"/>
e<_config:mapping xpath = "CatalogEntryIdentifier/ExternalIdentifier/StoreIdentifier/UniqueID" value = "Static Attribute 2"/>
f<_config:mapping xpath = "CatalogEntryAttributes/Attributes[Name='manufacturer']/StringValue/Value" value = "Static Attribute 3"/>
g<_config:mapping xpath = "ListPrice/Price/value" value = "Static Attribute 4"/>
h<_config:mapping xpath = "Price/StandardPrice/Price/Price/value" value = "Static Attribute 5"/>
i<_config:mapping xpath = "CatalogEntryAttributes/Attributes[AttributeIdentifier[ExternalIdentifier
[Identifier='{Attribute-Identifier}']]]/Value/value" value = "Static Attribute 6"/>
</_config:DataMapping>
5
<_config:BusinessObjectMediator className = "com.ibm.commerce.foundation.dataload.businessobjectmediator.BusinessObjectToCSVTransformMediator"
componentId = "com.ibm.commerce.catalog">
6
<_config:DataWriter className = "com.ibm.commerce.foundation.dataload.datawriter.CMDataWriter">
<_config:DataOutputLocation location = "../99999999.epcmf.csv"/>
7
<_config:Data>
<_config:column number = "1" name = "File Date"/>
<_config:column number = "2" name = "Client ID"/>
<_config:column number = "3" name = "Item ID"/>
<_config:column number = "4" name = "Item Name"/>
<_config:column number = "5" name = "Items Primary Category ID"/>
<_config:column number = "6" name = "Static Attribute 1"/>
<_config:column number = "7" name = "Static Attribute 2"/>
<_config:column number = "8" name = "Static Attribute 3"/>
<_config:column number = "9" name = "Static Attribute 4"/>
<_config:column number = "10" name = "Static Attribute 5"/>
<_config:column number = "11" name = "Static Attribute 6"/>
</_config:Data>
</_config:DataWriter>
</_config:BusinessObjectMediator>
</_config:BusinessObjectBuilder>
</_config:DataLoader>
</_config:DataloadBusinessObjectConfiguration>
Callout | Description |
---|---|
1 | The <_config:DataLoader> element
specifies the data extractor class to use. |
2 | The <_config:DataReader> element
specifies:
|
3 | The <_config:BusinessObjectBuilder> element
specifies:
|
4 | The <_config:DataMapping> element
defines the catalog entry data that populates the columns in the EPCMF
file. Each data mapping must specify:
The first three data mappings are mandatory for
the EPCMF file according to IBM Digital Analytics, formerly known
as Coremetrics Analytics;
do not modify these mappings. These three data mappings add the following
catalog entry data to the EPCMF file:
For the remaining data mappings, IBM Digital Analytics supports
up to 15 customer-defined static attributes in columns of the EPCMF
file. Six are predefined in this sample file. You can change any of
the xpath values to map different catalog entry elements
from the CatalogEntry noun to CSV columns, or you can add
an additional nine data mappings for a total of 15. The 6 predefined
mappings in the sample file add the following catalog entry data to
the EPCMF file:
|
5 | The <_config:BusinessObjectMediator> element
specifies the business object mediator class to use. |
6 | The <_config:DataWriter> element
specifies:
|
7 | The <_config:Data> element
defines the columns in the EPCMF file. The columns numbered 1 to 5
are mandatory columns that IBM Digital Analytics requires
in the EPCMF file. The remaining columns (columns numbered 6 through
11) are 6 of the 15 customer-defined "Static Attribute" columns. If
you are adding more data to the EPCMF file, you can define nine additional
columns and give them any name that you want. Here is an example:
|