WebSphere Commerce Enterprise

Running the list price migration utility

By running the list price migration utility, you migrate your existing list price data from the LISTPRICE table to different database tables (OFFER, OFFERPRICE, and OFFERDESC). The migration utility uses the Data Load utility to perform the migration.

Before you begin

About this task

This task applies to:
  • Single stores (stores that are not extended site stores)
  • Extended sites – complete this task on the following stores:
    • Storefront asset store
    • Catalog asset store
    • Each extended site store

The list price migration utility is a script that loads a data load configuration file to perform the migration. A sample data load configuration file (wc-listprice.xml) containing the correct settings for this list price migration is provided.

WebSphere Commerce DeveloperNote:

This supplied data load configuration file points to two other standard data load configuration files that must be present on your machine before running the migration utility:

  • Data Load utility environment settings file (wc-dataload-env.xml)
  • Data Load utility business object configuration file (wc-loader-offer.xml)

Procedure

  1. Copy the sample data load configuration file (wc-listprice.xml) to the correct location for the list price migration utility:
    Copy this file To this location
    • WebSphere Commerce DeveloperFor the WebSphere Commerce development environment, you must download the wc-listprice.xml file from the following link:

      wc-listprice.zip

    • WebSphere Commerce EnterpriseFor a WebSphere Commerce server, the file installs at this path:

      WC_installdir/components/management-center/samples/DataLoad/Price/MigrateListPrice/wc-listprice.xml

    • WebSphere Commerce DeveloperWCDE_installdir/samples/DataLoad/Price/MigrateListPrice/
    • WebSphere Commerce EnterpriseWC_installdir/samples/DataLoad/Price/MigrateListPrice/
  2. Make sure your existing data load configuration files are set up appropriately for the store you are migrating:
    1. Make sure the wc-dataload-env.xml file is at the following path:
      • WebSphere Commerce DeveloperWCDE_installdir/samples/DataLoad/Price/wc-dataload-env.xml
      • WebSphere Commerce EnterpriseWC_installdir/samples/DataLoad/Price/wc-dataload-env.xml

      Alternatively, you can change the path specified in the supplied data load configuration file (wc-listprice.xml).

    2. Check the environment variables in the wc-dataload-env.xml file. For more information, see Configuring the data load environment settings.
    3. Make sure you have a valid business object configuration file at the following path:
      • WebSphere Commerce DeveloperWCDE_installdir/samples/DataLoad/Price/Offer/wc-loader-offer.xml
      • WebSphere Commerce EnterpriseWC_installdir/samples/DataLoad/Price/Offer/wc-loader-offer.xml

      Alternatively, you can change the path specified in the supplied data load configuration file (wc-listprice.xml).

  3. Stop the WebSphere Commerce server.
  4. LinuxAIXFor IBM i OS operating system Ensure that you run the list price migration utility as the appropriate user:
    • LinuxAIXsu - wasuser_ID where: wasuser_ID is the non-root user ID created before installing WebSphere Commerce. The default WebSphere Application Server user name is wasuser.
    • For IBM i OS operating systemA user profile that has *SECOFR authority.
  5. Check the logging configuration in the data load logging file and make any necessary changes:
    • WebSphere Commerce DeveloperWCDE_installdir/WC_eardir/xml/config/dataload/logging.properties
    • WebSphere Commerce EnterpriseWC_eardir/xml/config/dataload/logging.properties

    The following settings in this file are relevant to this migration utility:

    Setting Description
    Logging level Specify either:
    level=INFO
    This is the typical level to use while running the utility. This level also lists all SQL statements you can use to roll back the migration.
    level=FINE
    This level lists all details as the utility runs. Use this level if you encounter errors or exceptions during the migration and you need additional information for troubleshooting.
    Log file location java.util.logging.FileHandler.pattern=../logs/wc-dataload.log

    The Data Load utility provides some command line options to change the trace level. For more information, see the Data Load utility.

    An error log file is generated for the migration, if there are any errors. The error log file is located in the same directory as the wc-dataload.log file.

  6. Open a command prompt window.
  7. Run the list price migration utility with arguments specifying the build file and the store ID.
    1. WebSphere Commerce Developer Call the migration script with the following command:
      • WCDE_installdir/bin/migrateListPrice /WCDE_installdir/samples/DataLoad/Price/MigrateListPrice/wc-listprice.xml -storeId=storeId -clearListPrice=CLEAR
      -storeId
      Required: The ID of the store you are migrating, as defined in the STORE_ID column of the STORE table.
      -clearListPrice
      Optional: Include this parameter only if you want the utility to also clear the LISTPRICE table for the store's catalog entries. The utility will clear the table only if there are no errors in the migration. Typically, you should exclude this parameter from the command, but you might want to clean out the old data during migration.
    2. WebSphere Commerce Enterprise Call the migration script with the following command:
      • WindowsWC_installdir/bin/migrateListPrice WC_installdir/samples/DataLoad/Price/MigrateListPrice/wc-listprice.xml -Dinstance=instance_name -storeId=storeId -clearListPrice=CLEAR
      • LinuxAIXFor IBM i OS operating systemWC_installdir/bin/migrateListPrice.sh WC_installdir/samples/DataLoad/Price/MigrateListPrice/wc-listprice.xml -Dinstance=instance_name -storeId=storeId -clearListPrice=CLEAR
      -Dinstance
      (Required) Specifies the instance you want to migrate. When using this parameter, replace instance_name with the name of the WebSphere Commerce instance for which you are migrating the list price data.
      -storeId
      (Required) The ID of the store you are migrating, as defined in the STORE_ID column of the STORE table.
      -clearListPrice
      Optional: Indicates that you want to clear the LISTPRICE table for the store's catalog entries, after migrating the data to the "OFFER" tables.
  8. Review the log file to understand the results of the migration.
    The location of the log file is configured in the logging.properties file; for more information, see step 5.
  9. At this point in the task flow, you should be able to view the applicable price lists and price rules that the migration utility has created in Management Center. To perform this check:
    1. Open the Catalog Filter and Pricing tool in Management Center, and select your store.
    2. In the explorer view, click the Price Lists folder.
    3. In the Price Lists - List page, look for the following two price lists that the migration utility has created (not applicable to storefront asset stores):
      Names of price lists according to store type

      Names of price lists according to store type

      Type of price list For this store type... The price list name is...
      1. Offer Price list Single store (not an extended site store) storeIdentifier

      Example: AuroraESite

      Catalog asset store storeIdentifier

      Example: Extended Sites Catalog Asset Store

      Extended site store storeIdentifier ProductsPriceList

      Example: AuroraESite ProductsPriceList

      In the extended site store, you will also see the Offer Price list from the catalog asset store; this price list will display a black arrow in the Type column.

      2. List Price list Single store (not an extended site store) storeIdentifierList

      Example: AuroraESiteList

      Catalog asset store storeIdentifierList

      Example: Extended Sites Catalog Asset StoreList

      Extended site store storeIdentifierList

      Example: AuroraESiteList

      In the extended site store, you will also see the List Price list from the catalog asset store; this price list will display a black arrow in the Type column.

    4. In the explorer view, click the Price Rules folder.
    5. In the Price Rules - List page, look for the following price rule that the migration utility has created (not applicable to catalog asset stores):
      • List price rule
    1. Close Management Center.