You must update the business object configuration file
(wc-dataextract-catalog-entry.xml) to specify
the custom access profile you created. In the same file, you must
specify how to map your non-attribute-dictionary attributes to static
attribute columns in the EPCMF file.
Procedure
- Open your business object configuration
file for EPCMF data at the following path:
- WCDE_installdir/samples/DataExtract/Catalog/CatalogEntry/wc-dataextract-catalog-entry.xml
- WC_installdir/samples/DataExtract/Catalog/CatalogEntry/wc-dataextract-catalog-entry.xml
- Specify the custom access profile that you created:
- Locate the following line of code,
which specifies the default access profile that the utility uses:
<_config:property name = "accessProfile" value = "IBM_Admin_DataExtract"/>
- Replace the value
IBM_Admin_DataExtract
with
the name of your custom access profile.For example:
<_config:property name="accessProfile" MyCompany_Admin_DataExtract_Nonattributedictionary_Attributes"/>
- Define new columns in the CSV file to contain
your non-attribute-dictionary attributes:
- Locate the column definitions for the
<_config:Data>
element,
similar to the following example:<_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>
- As child elements of the
<_config:Data>
element,
add new column definitions by using this syntax:<_config:column number="column_number" name="EPCMF_static_attribute_column"/>
Where:
- number
- The column number in the EPCMF file. Choose a column number from
6 to 20 that is not already defined, for example, 12.
- name
- The name of the column in the EPCMF file to store the data. You can name this column anything
that you want. For example, you could name the column
according to your custom catalog entry data. Alternatively,
you can use the existing generic naming convention, that is,
Static Attribute
number
. Either way, you must
create aliases for the static attributes in your EPCMF files
by using the Admin Console for IBM Digital Analytics, formerly known as Coremetrics Analytics. The aliases are the names that display in the IBM Digital Analytics Enterprise Product Report and
recommendation rules interface. For more information, refer
to the documentation for IBM Product Recommendations, formerly known as Coremetrics Intelligent
Offer.
For example, to define two new static attributes
columns, add the following two lines of code:
<_config:column number="12" name="Static Attribute 7" />
<_config:column number="13" name="Static Attribute 8" />
- Map XPath expressions for the non-attribute-dictionary
attributes to the columns you defined in the previous step:
- Locate the lines of code for the
<_config:DataMapping>
element:
<_config:DataMapping>
<_config:mapping xpath = "CatalogEntryIdentifier/ExternalIdentifier/PartNumber" value = "Item ID"/>
<_config:mapping xpath = "Description[0]/Name" value = "Item Name"/>
<_config:mapping xpath = "ParentCatalogGroupIdentifier/UniqueID" value = "Items Primary Category ID"/>
<_config:mapping xpath = "Description[0]/ShortDescription" value = "Static Attribute 1"/>
<_config:mapping xpath = "CatalogEntryIdentifier/ExternalIdentifier/StoreIdentifier/UniqueID" value = "Static Attribute 2"/>
<_config:mapping xpath = "CatalogEntryAttributes/Attributes[Name='manufacturer']/StringValue/Value" value = "Static Attribute 3"/>
<_config:mapping xpath = "ListPrice/Price/value" value = "Static Attribute 4"/>
<_config:mapping xpath = "Price/StandardPrice/Price/Price/value" value = "Static Attribute 5"/>
<_config:mapping xpath = "CatalogEntryAttributes/Attributes[AttributeIdentifier
[ExternalIdentifier[Identifier='{Attribute-Identifier}']]]/Value/value" value = "Static Attribute 6"/>
</_config:DataMapping>
- Add new
<_config:mapping>
elements
to provide the mapping for your non-attribute-dictionary attributes
by using this syntax:<_config:mapping xpath = "xpath_for_non-attribute-dictionary_attributes" value = "EPCMF_static_attribute_column"/>
Where:
- xpath
- The XPath expression for the non-attribute-dictionary attributes
in the CatalogEntry noun. The XPath expression must match
the structure of the logical schema. For more information, see WebSphere Commerce extended XPath notation.
- value
- The name of the column in the EPCMF file to store the attribute.
This name must match the column name that you defined in the
<_config:Data>
element
in step 3
The following example, which is included in the default
EPCMF file, provides a good example of the syntax for the XPath expression:
<_config:mapping xpath = "CatalogEntryAttributes/Attributes[AttributeIdentifier
[ExternalIdentifier[Identifier='{Attribute-Identifier}']]]/Value/value" value = "Static Attribute 6"/>
- Save and close the file.
- Test your customization by running the data extraction
utility and viewing the EPCMF file that contains your non-attribute-dictionary
attributes. For more information, see Running the IBM Product Recommendations data extraction utility.