Changing the catalog entry data that is extracted to the EPCMF file
Before you begin
To understand the catalog entry data that is predefined
as static attributes in the sample business object configuration file,
review the following topic and refer to the <_config:DataMapping>
element
description:
About this task
- Data that are represented by elements in the default WebSphere Commerce CatalogEntry noun.
- Attributes that are defined in the attribute dictionary for your catalog entries.
- To extract custom catalog entry attributes to the EPCMF file if you have customized the CatalogEntry noun, see Customizing the data extraction utility to extract custom catalog entry data.
- To extract non-attribute-dictionary attributes to the EPCMF file, see Customizing the IBM Product Recommendations data extraction utility to extract non-attribute-dictionary attributes.
- To extract category-level SKUs to the EPCMF file, see Customizing the IBM Product Recommendations data extraction utility to extract category-level SKUs.
Procedure
- Open your business object configuration file for EPCMF
data at the following path:
- WCDE_installdir/samples/DataExtract/Catalog/wc-dataextract-catalog-entry.xml
- WC_installdir/samples/DataExtract/Catalog/wc-dataextract-catalog-entry.xml
- Locate the lines of code for the
<_config:DataMapping>
element that is shown here:<_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>
The last six lines that start with
<_config:mapping
are the predefined static attributes for catalog entries. - Either update or remove the following data mapping that
is defined for
Static Attribute 6
:<_config:mapping xpath = "CatalogEntryAttributes/Attributes[AttributeIdentifier [ExternalIdentifier[Identifier='{Attribute-Identifier}']]]/Value/value" value = "Static Attribute 6"/>
This incomplete data mapping is provided as an example that you can update to extract values for any attribute dictionary attribute that is defined for your catalog entries. To update the data mapping, complete these steps:
- Find the identifier for the attribute dictionary attribute that you want to include in the EPCMF file. In Management Center, the identifier is listed in the Code column in the Attribute Dictionary-Attributes list view. See Listing attributes in the attribute dictionary.
- In the incomplete data mapping that is shown previously, replace
{Attribute-Identifier}
with the identifier for your attribute dictionary attribute.
For example, to include the attribute value of the attribute dictionary attribute
timer
in the EPCMF file, update the incomplete data mapping as shown here:<_config:mapping xpath = "CatalogEntryAttributes/Attributes[AttributeIdentifier [ExternalIdentifier [Identifier='timer']]]/Value/value" value = "Static Attribute 6"/>
To add more attribute dictionary attributes to the EPCMF file, you can add additional
<_config:mapping >
elements by using the syntax in the previous example.If you do not want to include any attribute dictionary attributes in your EPCMF file, delete the incomplete data mapping for
Static Attribute 6
. - Optional: To change the catalog entry data
that is extracted to the EPCMF file, use any of the following methods:
- Replace the
xpath
value of one of the existing<_config:mapping>
elements with the XPath expression for a different element in the default WebSphere Commerce CatalogEntry noun.The XPath expression must match the structure of the logical schema. For more information, see WebSphere Commerce extended XPath notation.
- Add new
<_config:mapping>
elements. Map the new<_config:mapping>
elements to the remaining"Static Attribute 7"
through"Static Attribute 50"
columns.For example, you could add the following two<_config:mapping>
elements to the<_config:DataMapping>
element:<_config:mapping xpath="CatalogEntryAttributes/Attributes[Name='manufacturerPartNumber']/StringValue/Value" value="Static Attribute 7" /> <_config:mapping xpath="CatalogEntryAttributes/Attributes[Name='displayToCustomer']/StringValue/Value" value="Static Attribute 8" />
- Replace the
- Within the
<_config:column>
element, make sure that you have columns that are defined for all your data mappings:For example:
- If you added these two
<_config:mapping>
elements:<_config:mapping xpath="CatalogEntryAttributes/Attributes[Name='manufacturerPartNumber']/StringValue/Value" value="Static Attribute 7" /> <_config:mapping xpath="CatalogEntryAttributes/Attributes[Name='displayToCustomer']/StringValue/Value" value="Static Attribute 8" />
- You must add these two
<_config:column>
elements to define two additional columns in the EPCMF file:<_config:column number="12" name="Static Attribute 7" /> <_config:column number="13" name="Static Attribute 8" />
- If you added these two
- Save and close the file.