Sample: Updating SKU inventory

This sample demonstrates how to update inventory quantities for the SKUs that have already been loaded to the database. Restriction: Inventory quantities cannot be viewed in the Management Center. If we are using the Catalogs tool in the Management Center, we must verify the inventory quantities using the SQL statements provided.


About this sample

This sample updates the inventory quantity of the SKU with the part number 'Cords-Black-29W x 28' to 200.


Procedure

Before running this sample, ensure that you have loaded the initial data.

  1. (Developer) On a command line, go to the WCDE_installdir\bin directory.

  2. (Linux) Open a command line in the Utility server Docker container. Change the directory to utilities_root/bin directory.
    For information about entering and leaving containers, see Running utilities from the Utility server Docker container.

  3. Enter the following command:

    • (Linux) ./dataload.sh ../samples/DataLoad/Catalog/IntegrateScenario/wc-dataload-nonATP-inventory.xml

    • (Developer) dataload ..\samples\DataLoad\Catalog\IntegrateScenario\wc-dataload-nonATP-inventory.xml

    Alternatively for an ATP store, run data load by using wc-dataload-ATP-inventory.XML.

    • (Linux) ./dataload.sh ../samples/DataLoad/Catalog/IntegrateScenario/wc-dataload-ATP-inventory.XML

    • (Developer) dataload ..\samples\DataLoad\Catalog\IntegrateScenario\wc-dataload-ATP-inventory.XML


Verifying results

The wc-dataload-nonATP-inventory.xml configuration file updates the inventory quantities for the SKUs loaded in the initial load sample. Verify that the inventory data is loaded by looking at the INVENTORY table:

Alternatively for an ATP store to see how a particular store allocates inventory for the SKU with part number 'Cords-Black-29W x 28' enter:


Cleaning up the data

To remove the data loaded in this sample from the database, run the CleanUp.sql file in the /samples/DataLoad/Catalog/IntegrateScenario directory.

Note: After running the CleanUp.sql file, we might see that 0 rows are deleted for certain SQL statements. This result is expected, as not all rows are populated with data in this sample.