WebSphere Commerce Developer

Exporting customer segments from the production database in a development environment

You can configure your WebSphere Commerce development environment so that you can export customer information from the production environment database. You can then use the customer information to help test any customization of the customer segment export feature.

For more information about exporting customer segment information with the Marketing tool, see Exporting customer segment information.

Note: To export customer segment information in the development environment does not require a connection to the production environment database. When you run the export feature in the development environment and no connection to the production database exists, the feature exports the information from the development environment database. If you do not need to export information from the production environment, use the development environment database by using the export feature without a production database connection.

Before you begin

Ensure that you complete the following tasks in the development environment:

Procedure

  1. Configure a connection to the production environment database.
  2. Synchronize the customer segments between the development and production environments.
  3. Ensure that the customer segments in your development environment that you want to export exist in your production environment. If a segment that is being exported does not exist in the production environment, the generated export file does not include any data.

    The customer segments that you want to export need to have the same identifying values in both environments. For example, the MBRGRP.MBRGRP_ID value. The customer segment export uses the ID values in the development environment to create an SQL query to retrieve the customer segment information. By having the same values in both environments, you can ensure that the query retrieves data for the correct segment. If the ID values are different between environments, the query can fail to return information from the production environment database or return information for the wrong customer segment.

  4. Configure the customer segment export feature to use the production environment database connection.
    1. Open WebSphere Commerce Developer and switch to the Enterprise Explorer view.
    2. Go to the following directory:

      WC_eardir\xml\config\com.ibm.commerce.marketing-fep-ext

      If the com.ibm.commerce.marketing-fep-ext folder does not exist, create this folder.
    3. Open the wc-admin-component.xml file for editing.
      If this file does not exist, you must create this file. For more information about creating this file, see Changing properties in the marketing component configuration file (wc-admin-component.xml).
    4. Locate the Customer Segment Export section in the file and change the value of the CustomerSegmentExtractUseProductionConnectionInDeveloperEnv configuration property to be true.
    5. Save and close the file.
  5. Restart the WebSphere Commerce Test Server.
  6. Verify that the configuration is successful and that you can export customer segments from the production environment database.
    1. As a user that has the Marketing Director role, open the Marketing tool.
    2. Export the customer information for a customer segment and download the exported file.
    3. In a file management utility, go to the following directory:

      WCDE_installdir\logs

    4. Open the trace.txt file for editing. This file includes the SQL statement that the customer segment export feature used to export the customer segment from the production environment database. Copy the SQL statement.
    5. Open a connection to your production database and run the copied SQL statement to view the information for the exported customer segment. Compare the contents of the downloaded export file with the database query results to verify that the file contents are for the correct customer segment in the production environment.