Sample: Updating SKU inventory
This sample demonstrates how to update inventory quantities for the SKUs that have already been loaded to your database.
Restriction: Inventory quantities
cannot be viewed in the Management Center. If you are using the Catalogs
tool in the Management Center, you 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.
- Open the command-line interface, and navigate to the appropriate
directory:
- WC_installdir/bin
- WCDE_installdir\bin
- Enter the following command:
- ./dataload.sh ../samples/DataLoad/Catalog/IntegrateScenario/wc-dataload-nonATP-inventory.xml
- dataload ..\samples\DataLoad\Catalog\IntegrateScenario\wc-dataload-nonATP-inventory.xml
Alternatively for an ATP store, run data load using wc-dataload-ATP-inventory.xml.- ./dataload.sh ../samples/DataLoad/Catalog/IntegrateScenario/wc-dataload-ATP-inventory.xml
- 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:- To return the inventory quantity for the SKU with the part number 'Cords-Black-29W x
28',
enter:
The inventory quantity returned should be 200.select * from inventory where catentry_id = (select catentry_id from catentry where partnumber ='Cords-Black-29W x 28L')
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:
select TrackInventory, BackOrderable, ReleaseSeparately, Creditable, ForceBackorder,
ReturnNotDesired, PickingMethod, Discontinued, MinQTYForSplit, QuantityMeasure,
QuantityMultiple from baseitem b, itemspc i, storeitem s, distarrang d where b.baseitem_id=i.baseitem_id
and b.baseitem_id=s.baseitem_id and b.baseitem_id=d.baseitem_id and i.partnumber='Cords-Black-29W x 28L'
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, you 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.