WebSphere Commerce Version 8.0.4.0

Sample: Loading surcharge tax calculation data

This sample demonstrates how to load surcharge tax calculation data with the Data Load utility. After you load the data, the calculation framework can calculate a tax on surcharge for the Aurora starter store.

About this sample

The CSV input file and Data Load utility configuration files for this sample are in the following download: Extract the downloaded files into a working directory, represented by working_dir in this sample.

Before you begin

After you extract the downloaded files into a working directory, update the TaxOnSurcharge.csv file and replace the value of JurisdictionGroup with the value found in the JURSTGROUP.CODE column.

Sample input and configuration files

The following table lists the input files that you use to load the sample data. The table also identifies the business object mediators and business object configuration files that the Data Load utility uses to load the sample data.
Table 1. Input file for loading surcharge tax calculation data.
Sample input file Description
TaxOnSurcharge.csv The Data Load utility uses this sample input file to load the data to calculate surcharge tax. After the utility loads the data, surcharge tax can be calculated when you enable surcharge tax calculation in the Aurora starter store. For more information, see Enabling surcharge tax calculations in the Aurora starter store.

The Data Load utility uses the following business object mediator to load the data in this input file.

Business object mediator

com.ibm.commerce.foundation.dataload.businessobjectmediator.TableObjectMediator

The sample directories also include the following Data Load utility configuration files:
wc-dataload.xml
The data load order configuration file, which identifies the CSV input file and 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 WebSphere 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-tax-on-surcharge.xml
The business object configuration file that defines how the surcharge tax calculation data is loaded into the database. The file also defines the appropriate business object mediator to use to load the data.
Note: These configuration files include values for a default WebSphere Commerce Developer environment that uses an Apache Derby database. If your environment settings are different, you must change the configured values in these files to match your environment.

Procedure

  1. Open a command-line utility and go to the appropriate directory:
    • LinuxAIXWC_installdir/bin
    • WindowsWC_installdir\bin
    • WebSphere Commerce DeveloperWCDE_installdir\bin
  2. Enter the following command to run the sample data load order file and load the information that included in this sample:
    • LinuxAIX./dataload.sh working_dir/TaxOnSurcharge/wc-dataload.xml
    • Windowsdataload.bat working_dir\TaxOnSurcharge\wc-dataload.xml
    • WebSphere Commerce Developerdataload working_dir\TaxOnSurcharge\wc-dataload.xml
    Note: Enter the path to the working_dir as a relative path.

Verifying results

To verify that the utility loaded the surcharge tax calculation data successfully, complete the following tasks: