Load marketing objects with the Data Load utility

We can configure the Data Load utility to load marketing data to create customer segments, e-Marketing Spots, activities, marketing content, and any associated assets. By using the Data Load utility to load this data, we can quickly create multiple marketing objects and types of objects in a single operation.


Before beginning

Ensure that any catalog entries, categories, email templates, or attachment managed files associated with the marketing objects that we are loading exist in the target store. When we use the Data Load utility to load marketing data, the utility creates only the marketing objects, descriptive information, and relationships. If the associated objects that the utility does not load do not exist in the target database, the load process can fail since the Data Load utility cannot resolve the unique ID values for the associated objects. If you plan to load marketing objects that need these types of associated objects, we must manually create the object before you load your marketing data.


Task info

We can use the Data Load utility only to insert, replace, or delete marketing objects. Running the utility in update mode to change marketing objects is not supported. When we are loading marketing data with the Data Load utility and use the provided sample configuration files, the utility runs in insert mode by default. Sample configuration files are provided to configure the utility to load data to create the following marketing object types:

When you load marketing data with the Data Load utility, the utility uses the configured business object configuration files and business object mediators to transform and load the marketing data. The utility uses the configured mediators to convert each marketing object within each input file into a data object. The data objects are then persisted into the database. After the load process completes, the marketing objects can be available for business users to view and manage in the Marketing tool.

For more information about the available sample configuration files and the data that can be loaded with each file, see Sample: Loading marketing data. Notes:


Procedure

  1. Create your input files for each type of marketing object to load. We can use sample input files to help us create our own input files. Copy and edit the sample files to replace the sample data with our own marketing object data. The sample input files are included in the following directory and subdirectories. There is a different subdirectory for each type of marketing object. These directories each include one or more input files for loading all of the information that can be used for each marketing object type.

    Depending on the type of marketing object that we are loading, we might need to load multiple input files.Important: The names of the columns or elements in your input file must use specific names. For more information about these column names and the information that can be in each marketing object input file, see Marketing object input file definitions. Tip: We can use the Data Extract utility to help you generate your input files. If we are creating the same marketing objects in multiple environments, such as for testing purposes, create the objects in one environment with the Marketing tool. Then, extract those objects into output CSV files with the Data Extract utility. We can use these output files as input files for the Data Load utility to load the marketing objects into your other environments. See Extracting marketing data with the Data Extract utility.

  2. Create the Data Load utility configuration files that you need to load your marketing data.

    1. Go to appropriate directory, which contains the sample configuration files for loading marketing data.

      • (Developer) On a command line, go to the WCDE_installdir\samples\DataLoad\Marketing directory.

      • (Linux) Open a command line in the Utility Docker container. Change the directory to the utilities_root/samples/DataLoad/Marketing directory.

      For information about entering and leaving containers, see Running utilities from the Utility server Docker container.

    2. Copy the sample configuration files and directories to a local directory. Edit your copy of the sample configuration files to configure the utility for the environment.

  3. Optional: To load custom marketing data, go to each marketing object subdirectory and create a backup of each business object configuration file. For example, the CustomerSegment directory includes the following business object configuration files:

    • wc-loader-member-group.xml

    • wc-loader-member-group-condition.xml

    • wc-loader-member-group-description.xml

    To load custom data, we must customize your copied business object configuration files to configure the mappings for our custom data. Ensure that we define how the Data Load utility maps your data to the appropriate database table or tables.

  4. Open the data load environment configuration file (wc-dataload-env.xml) for editing and update the configured settings to match the environment settings.

  5. Open the data load order configuration file (wc-dataload.xml) for editing and configure the settings to load your marketing data.

    1. In the <_config:DataLoadEnvironment> element, ensure that the value of the configFile attribute identifies the environment configuration file. If the file is not in the same directory as the data load order configuration file, include the relative path to the file.

    2. For each <_config:LoadItem> element, ensure that the value for the name and businessObjectConfigFile attributes identify the correct marketing object and business object configuration file. If one or more of your files are not in the default location, update the appropriate businessObjectConfigFile attribute to include the relative path to the file location.

      Note: When you load data to insert or replace marketing activity elements for an activity, the utility replaces all existing elements for the activity before the utility inserts new elements. If you do not want the utility to remove all existing elements before the utility inserts new elements, include the replaceAllElements configuration property in the load item configuration for marketing elements. This property indicates whether the Data Load utility replaces the existing elements for an activity with the elements within the input file. We can set the following values for this property:

        true
        The Data Load utility deletes all existing elements for an activity before the utility loads new elements. This value is the default value.

        false
        The Data Load utility does not replace all existing elements. Only the existing elements that match elements in the input file are replaced.

    3. For each <_config:DataSourceLocation> element, ensure that the value of the location attribute identifies the input file for the marketing object. If the file is not in the default location, include the relative path to the file.

    4. Save and close the configuration file.

  6. Run the Data Load utility. To load data for only specific marketing objects, use -DLoadOrder parameter when you run the utility. For example, to load data for only marketing activities, your command can resemble the following command:

    • (AIX) (Linux) ./dataload.sh ../samples/DataLoad/Marketing/wc-dataload.xml -DLoadOrder="MarketingCampaign, MarketingActivity, MarketingElement, MarketingElementNVP"

    • (Windows) dataload.bat ..\samples\DataLoad\Marketing\wc-dataload.xml -DLoadOrder="MarketingCampaign, MarketingActivity, MarketingElement, MarketingElementNVP"

    • (Developer) dataload.bat ..\samples\DataLoad\Marketing\wc-dataload.xml -DLoadOrder="MarketingCampaign, MarketingActivity, MarketingElement, MarketingElementNVP"

  7. Verify that the marketing data is loaded by reviewing the data load summary report. For more information about the location and contents of this summary report, see Verify that the Data Load utility loaded the data successfully.

    • We can also verify that the marketing data is loaded by comparing the contents of your input files with the data within your target WebSphere Commerce database. Ensure that the data within the sample input files exists within the appropriate database tables.

    • In Management Center, verify that we can view the newly loaded marketing objects in the Marketing tool.