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>
The sections that are labeled with blue callouts in the previous sample business object configuration file are described here:
Callout Description
1 The <_config:DataLoader> element specifies the data extractor class to use.
2 The <_config:DataReader> element specifies:
  • The data reader class to use.
  • The value for the pageSize parameter. This parameter specifies the number of records that the utility can extract for every service call made. If you are using the utility with the Oracle database, the pageSize value is limited to 1000.
  • Business context properties that you must provide for your site (clientID, storeID, username, password).
  • The access profile that is used by the utility. The default access profile is IBM_Admin_DataExtract. You can replace the default access profile with a custom access profile if you are customizing the utility. For an example, see Updating the business object configuration file for EPCMF data to include the custom catalog entry data.
3 The <_config:BusinessObjectBuilder> element specifies:
  • The business object builder class to use.
  • The type of data object to build. For an EPCMF file, the dataObjectType is CatalogEntryType because the data object is built from the CatalogEntry noun.
4 The <_config:DataMapping> element defines the catalog entry data that populates the columns in the EPCMF file. Each data mapping must specify:
xpath
The XPath expression for the catalog entry element in the CatalogEntry noun. The XPath expression must match the structure of the logical schema.
value
The name of the column in the EPCMF file to store the data. This name must match a column name that is defined in the <_config:Data> element. (See 7 below.)
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:
  • a The unique part number of the catalog entry.
  • b The name of the catalog entry.
  • c The unique ID of the category to which the catalog entry belongs.
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:
  • d The short description for the catalog entry.
  • e The storeId of the store to which the catalog entry belongs.
  • f The name of the manufacturer for the catalog entry.
  • g The list price for the catalog entry.
  • h The offer price (standard price) for the catalog entry. By default, the price is retrieved from the OFFERPRICE database table. For stores that use price rules to set offer prices, you can specify a different access profile to retrieve price rule prices instead. For more information, see Extracting prices from price rules to the EPCMF file. If the catalog entry has range pricing, then the price in this column is the price for a quantity of 1.
  • i An attribute dictionary attribute for the catalog entry. This data mapping is an incomplete example that you can update to specify an attribute dictionary attribute of your choice, or you can delete this data mapping.
5 The <_config:BusinessObjectMediator> element specifies the business object mediator class to use.
6 The <_config:DataWriter> element specifies:
  • The data writer class to use. The default class is com.ibm.commerce.foundation.dataload.datawriter.CSVDataWriter.
  • The location to place the EPCMF file that the data extract utility outputs. You can change the location to any absolute or relative path.
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:
<_config:column number = "12" name = "Static Attribute 7"/>
<_config:column number = "13" name = "Static Attribute 8"/>
<_config:column number = "14" name = "Static Attribute 9"/>
<_config:column number = "15" name = "Static Attribute 10"/>
<_config:column number = "16" name = "Static Attribute 11"/>
<_config:column number = "17" name = "Static Attribute 12"/>
<_config:column number = "18" name = "Static Attribute 13"/>
<_config:column number = "19" name = "Static Attribute 14"/>
<_config:column number = "20" name = "Static Attribute 15"/>