Sample: Order Justification
About this sample
This sample loads a sample justification and its descriptions into ORDJUST and ORDJUSTDESC database tables. Return justifications can be used when a Customer Service Representative (CSR) files an order return or requests appeasement for an order.
utilities_root/samples/DataLoad/Order/Justification
WCDE_installdir\samples\DataLoad\Order\Justification
Sample input and configuration files
The following table lists the input source files used for loading order justification. The table also lists the business object mediators and business object configuration files that the Data Load utility uses to load the order justification.
Sample input file | Description |
---|---|
CSV
XML
|
The Data Load utility uses these sample input files to load the
order justification and descriptions. The order justification is loaded first, and
then the description. The Data Load utility uses the table object mediator and the following business object configuration files to load the data within this input file: Business object mediator com.ibm.commerce.foundation.businessobjectmediator.TableObjectMediator Business
object configuration file
For more information about the table object mediator, see Data Load utility table-based mediator and builder. |
Procedure
- In a file manager, go to the following directory:
utilities_root/samples/DataLoad/Order/Justification
WCDE_installdir\samples\DataLoad\Order\Justification
- Open the wc-dataload-env.xml data load environment configuration file for editing. Update the file to set the environment settings within the file to match your environment setting. For more information about this configuration file, see Configuring the data load environment settings.
On a command line, go to the WCDE_installdir\bin directory.
Open a command line and change the directory to the utilities_root/bin. For more 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 for loading store
configuration information:
./dataload.sh ../samples/DataLoad/Order/Justification/wc-dataload-order-justification.xml
dataload ..\samples\DataLoad\Order\Justification\wc-dataload-order-justification.xml
For more information about configuring and running the Data Load utility, see Configuring and running the Data Load utility.
Verifying results
Ensure that the sample order justification is correctly 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.
select * from ORDJUST;
select * from ORDJUSTDESC;
Ensure
that the data within the sample input files exists within the database table for the
appropriate store.Removing the sample data from the HCL Commerce database
To remove the sample data from your database, run the sample again but with the value for
the delete column set to 1
for all entries within the files. By setting the
value for this column to 1
, the Data Load utility deletes the data
identified in the CSV file from your database.
When an order justification is deleted in the ORDJUST table, all related descriptions in the ORDJUSTDESC table will also be cascading deleted. Ensure the corresponding data in the order justification description input file is not included when deleting the order justification.
1
for order justification load. This action will mark the entry as
deleted, but it does not physically delete the record. This functionality is primarily
utilized in CSR tooling to hide the justification from display, without affecting the
existing appeasement or return relationship.