Updating the business object configuration file for EPCMF data to include the non-attribute-dictionary attributes

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.

Before you begin

  1. Ensure that your business object configuration file for EPCMF data is already in the correct directory and configured for your site according to the instructions in Configuring the IBM Product Recommendations data extraction utility.
  2. Review the following topic to understand the contents of the business object configuration file for EPCMF data:

    Sample business object configuration file for EPCMF data

Procedure

  1. Open your business object configuration file for EPCMF data at the following path:
    • WebSphere Commerce DeveloperWCDE_installdir/samples/DataExtract/Catalog/CatalogEntry/wc-dataextract-catalog-entry.xml
    • WC_installdir/samples/DataExtract/Catalog/CatalogEntry/wc-dataextract-catalog-entry.xml
  2. Specify the custom access profile that you created:
    1. Locate the following line of code, which specifies the default access profile that the utility uses:
      <_config:property name = "accessProfile" value = "IBM_Admin_DataExtract"/>
    2. 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"/>
  3. Define new columns in the CSV file to contain your non-attribute-dictionary attributes:
    1. 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>
    2. 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" />
  4. Map XPath expressions for the non-attribute-dictionary attributes to the columns you defined in the previous step:
    1. 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>
    2. 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"/>
  5. Save and close the file.
  6. 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.