Changing the catalog entry data that is extracted to the EPCMF file

Review the predefined static attributes for the EPCMF file and change the file to suit your business needs. The EPCMF file can include up to 50 customer-defined static attributes for catalog entries. The sample business object configuration file for the EPCMF file predefines six of these static attributes. You can update the business object configuration file to include different or more data for your catalog entries.

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

Using the instructions in this task, you can extract the following types of data to your EPCMF file:
  • 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.
Extracting other types of data to your EPCMF file might require customization and are therefore not covered in this task:

Procedure

  1. Open your business object configuration file for EPCMF data at the following path:
    • WebSphere Commerce DeveloperWCDE_installdir/samples/DataExtract/Catalog/wc-dataextract-catalog-entry.xml
    • WC_installdir/samples/DataExtract/Catalog/wc-dataextract-catalog-entry.xml
  2. 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.

  3. 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:

    1. 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.
    2. 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.

  4. 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" />
  5. 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" />
  6. Save and close the file.