Introduced in Feature Pack 3

Configuring the IBM Product Recommendations data extraction utility

The IBM Product Recommendations, formerly known as Coremetrics Intelligent Offer utility uses a set of configuration files to extract the data for ECDF and EPCMF files. You must copy sample configuration files to the correct location and then configure certain environment and business context parameters in the files. You must also configure a set of client library configuration files with the correct port and host name of your web server.

Procedure

  1. Create the following directory structure to contain the configuration files for the utility:
    • WebSphere Commerce Developer WCDE_installdir/samples/DataExtract/Catalog/
    • WebSphere Commerce EnterpriseWebSphere Commerce - ExpressWebSphere Commerce Professional WC_installdir/samples/DataExtract/Catalog/
  2. Navigate to the following directory, which contains the sample configuration files:
    • WebSphere Commerce Developer WCDE_installdir/components/foundation/samples/DataExtract/Catalog/
    • WebSphere Commerce EnterpriseWebSphere Commerce - ExpressWebSphere Commerce Professional WC_installdir/components/foundation/samples/DataExtract/Catalog/
  3. Copy the contents of the Catalog directory to the new Catalog directory you created in step 1.
    The new Catalog directory should now contain the configuration files that you need before you can run the utility:
    File Location
    The environment configuration file /DataExtract/Catalog/wc-dataextract-env.xml
    The main configuration file /DataExtract/Catalog/wc-dataextract.xml
    The business object configuration file for EPCMF data /DataExtract/Catalog/wc-dataextract-catalog-entry.xml
    The business object configuration file for ECDF data /DataExtract/Catalog/wc-dataextract-catalog-group.xml
  4. Open the wc-dataextract-env.xml and configure the language setting:
    langId
    Specify language ID for which you want to extract data, for example, -1 for English.
    currency
    Specify the currency code for the currency in which you want prices that are retrieved for the catalog entries, for example, USD.
  5. Optional: Open the wc-dataextract.xml file and check that the relative paths to wc-dataextract-env.xml and wc-dataextract-catalog-entry.xml are correct.
    You should not need to change the paths unless you used a different directory structure than the one described in this procedure.
    Feature Pack 5 or laterIf you do use a different directory structure, you might need to update the command file for running the utility to point to the new directory location. For instance, if the directory structure where you are storing the files is outside of the WebSphere Commerce install directory structure. To update the command file to point to the directory location, complete the following steps:
    1. Go to the following directory and open either the dataextract.bat or dataextract.sh file for editing:
      • WebSphere Commerce DeveloperWCDE_installdir/bin
      • WebSphere Commerce EnterpriseWebSphere Commerce - ExpressWebSphere Commerce ProfessionalWC_installdir/bin
    2. Update the value DATAEXTRACT_CONFIG_PATH environment variable to point to the relative path of the directory that includes the configuration files.
    3. Save and close the command file for the utility.
  6. Prepare the business object configuration file for EPCMF data:
    1. Open the wc-dataextract-catalog-entry.xml file, and configure the following settings:
      clientId
      Specify your IBM Digital Analytics client ID. This ID is your unique 8-digit IBM Digital Analytics assigned account code, for example, 99999999. The client ID you specify here is written to the second column of the CSV files by the data extraction utility.
      storeId
      Specify the store ID for the store you are extracting data from, for example, 10101. The storeId is the store entity ID as defined in the STORE_ID column of the STORE table.
      If you have multiple stores that use the same IBM Digital Analytics client ID, you can specify more than one store ID, as shown in this example:
      <_config:property name="storeId" value="10001, 10101, 10051"/>

      For an extended sites store model, you cannot specify a store ID of a catalog asset store. Instead, specify the store IDs of the extended site stores. If you specify a combination of extended site store IDs and catalog asset store IDs, the data extraction utility ignores the catalog asset store IDs.

      username
      Specify the WebSphere Commerce administrator logon ID, for example, wcsadmin.
      password
      Specify the encrypted WebSphere Commerce administrator logon password. For example, if the password is wcsadmin, the encrypted password might be 3fdBFMFoiGNQ0zUStB865w==. For security purposes, the password is always encrypted. If you do not specify the password here, you are prompted to enter the password on the command line when you run the data extraction utility. To generate the encrypted password, use the wcs_encrypt utility without the merchant key or -k parameters.  For more information, see Generate encrypted data (wcs_encrypt).
      DataOutputLocation
      The file name and relative filepath location of the CSV file that is generated by the data extraction utility. Update the value for the _config:DataOuputLocation element within the sample file so the file name of the generated CSV file includes your client ID and follows the EPCMF file name format. For example, use the format <_config:DataOutputLocation="../EPCMF_<clientid>.csv" /> where <clientid> is the value of your client ID.
    2. Save and close the file.
  7. Prepare the business object configuration file for ECDF data:
    1. Open the wc-dataextract-catalog-group.xml file, and configure the same settings as described in step 6.a.
    2. Save and close the file.
  8. Create the following directory structure to contain the client library configuration files that the utility uses:
    • WebSphere Commerce Developer WCDE_installdir/samples/DataExtract/config/
    • WebSphere Commerce EnterpriseWebSphere Commerce - ExpressWebSphere Commerce Professional WC_installdir/samples/DataExtract/config/
  9. Navigate to the following directory, which contains the sample client library configuration files:
    • WebSphere Commerce Developer WCDE_installdir/components/foundation/samples/DataExtract/config/
    • WebSphere Commerce EnterpriseWebSphere Commerce - ExpressWebSphere Commerce Professional WC_installdir/components/foundation/samples/DataExtract/config/
  10. Copy the contents of the config directory to the new config directory you created in step 8.
  11. In the client library configuration files within the config directory, configure the host name and port of the web server.
    You must make this configuration because the data extraction utility is a client application that is deployed in J2SE environment; therefore, there is no naming service to resolve the reference to the web service, so the local EJB binding cannot be used. Instead, the URL binding of the web service is defined in the binding configuration of the client.
    1. Open the client library configuration file for the catalog component in an editor:
      • WebSphere Commerce Developer WCDE_installdir/samples/DataExtract/config/com.ibm.commerce.catalog/wc-component-client.xml
      • WebSphere Commerce EnterpriseWebSphere Commerce - ExpressWebSphere Commerce Professional WC_installdir/samples/DataExtract/config/com.ibm.commerce.catalog/wc-component-client.xml
    2. Locate the line in which the URL for the component services is specified, similar to the following example:
      <_config:property name = "url" value = "http://localhost:8007/webapp/wcs/component/catalog/services/CatalogServices"/>
    3. In the URL, update localhost:8007 to match the host name and port for the web server.
      WebSphere Commerce EnterpriseWebSphere Commerce - ExpressWebSphere Commerce Professional
      • Replace localhost with the corresponding host name even if the web server is on the same machine because all the localhost service requests are blocked in most machines.
      • In WebSphere Commerce, the default port number that is used for component service requests is 8007, but the actual port number for your web server might be different. You can determine the port number by identifying the virtual host that is bound to the CatalogServicesHTTPInterface web module. The virtual host settings contain the port numbers. You can obtain this information from the WebSphere Application Server administration console.
      WebSphere Commerce Developer
      • The web server is included within the development environment. If you are running the Data Extract utility on the same machine, you can keep the default localhost value. If you are running the utility on a different machine, configure the host name to point to the server location for that machine.
      • You do not need to change the port number value. The port number defaults to port 80 for WebSphere Commerce Developer environments.
    4. Save and close the file.
    5. Repeat steps 11.a to 11.d for the client library configuration files for both the infrastructure and member components. You can find these client library configuration files at the following locations:
      • Infrastructure component:
        • WebSphere Commerce DeveloperWCDE_installdir/samples/DataExtract/config/com.ibm.commerce.infrastructure/wc-component-client.xml
        • WebSphere Commerce EnterpriseWebSphere Commerce - ExpressWebSphere Commerce ProfessionalWC_installdir/samples/DataExtract/config/com.ibm.commerce.infrastructure/wc-component-client.xml
      • Member component:
        • WebSphere Commerce DeveloperWCDE_installdir/samples/DataExtract/config/com.ibm.commerce.member/wc-component-client.xml
        • WebSphere Commerce EnterpriseWebSphere Commerce - ExpressWebSphere Commerce ProfessionalWC_installdir/samples/DataExtract/config/com.ibm.commerce.member/wc-component-client.xml