Loading customer segment members
About this sample
- utilities_root/samples/DataLoad/Member/CustomerSegment
- WCDE_installdir\samples\DataLoad\Member\CustomerSegment
Sample input and configuration files
Sample CSV input file | Description |
---|---|
TestCustomerSegment.csv | This sample file includes only a single column of email addresses. The file
does not include any column or file header information. When you are loading a list of email
addresses to create a customer segment, you do not need to include any header information. The Data Load utility uses this sample input file to load the list of email addresses to create a customer segment in the Marketing tool. This sample also populates the customer segment with members. The Data Load utility uses the following business object mediator to load the data in this input file into the MBRGRP database table. Business object mediator com.ibm.commerce.member.dataload.mediator.MemberGroupMemberMediator |
- wc-dataload.xml
- The data load order configuration file, which identifies the order that the Data Load utility loads the sample CSV files. The load order file also identifies the appropriate business object configuration file to use to load each input file. For more information about load order configuration files, see Configuring the data load order.
- wc-dataload-env.xml
- The data load environment configuration file, which includes the environment variables for your
HCL Commerce instance. These variables include
the following information:
- Business context variables, including the store identifier, catalog identifier, and the default language and currency for your store.
- Database environment settings, including the database type, name, and schema.
- wc-loader-customer-segment-email.xml
- The business object configuration file that defines how customer segment member group data is loaded into the database. The file also defines the appropriate business object mediator to use to load the data.
Procedure
- On a command line, go to the WCDE_installdir\bin directory.
- Open a command line in the . Change the directory to utilities_root/bin directory. For information about entering and leaving containers, see Running utilities from the Utility server Docker container.
- Enter the following command to run the sample data load order file and load the information that
included in this sample:
- ./dataload.sh ../samples/DataLoad/Member/CustomerSegment/wc-dataload.xml
- dataload ..\samples\DataLoad\Member\CustomerSegment\wc-dataload.xml
Verifying results
- Verify that the customer segment data is loaded by reviewing the data load summary report. For more information about the location and contents of this summary report, see Verifying the results of the data load.
- You can also verify that the sample data is loaded by running the following SQL statements
against your HCL Commerce
database:
Ensure that the data within the sample input files exists within the appropriate database tables.select * from MBRGRP; select * from MBRGRPMBR;
- In Management Center, verify that you can view the customer segments exist in the Marketing tool.
Removing the sample data from the HCL Commerce database
To
remove the sample data from your database, run the sample again with the utility in delete mode.
Edit the wc-dataload.xml load order configuration file to change the value of
the dataLoadMode
attribute from "Replace"
to
"Delete"
to run the Data Load utility in delete mode. When you run the utility in
delete mode, the utility deletes the data in your database that matches the rows in your CSV file.
You do not need to edit the value for Delete column in your input CSV file.
- utilities_root/samples/DataLoad/Member/CustomerSegment
- WCDE_installdir\samples\DataLoad\Member\CustomerSegment
- db2 -tvf ../samples/DataLoad/Member/CustomerSegment/Cleanup.sql
- sqlplus user_name/password@ database_name@ ../samples/DataLoad/Member/CustomerSegment/Cleanup.sql
select * from MBRGRP;
select * from MBRGRPMBR;
The data that you
loaded with this sample should no longer exist in your database.In Management Center, verify that you can no longer view the customer segments in the Marketing tool.