Sample: Loading non-ATP inventory
About this sample
Each record stands for an inventory for a particular CatalogEntry be shipped from a FulfillmentCenter on behalf of a Store. The CatalogEntry can be identified by the PartNumber In non_ATP_inventory.csv and storeIdentifier in wc-dataload-env.xml For non-ATP store, we only load inventory for item data, it doesn't make sense to load inventory for product 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 appropriate command:
- B2C or B2B store
- ./dataload.sh ../samples/DataLoad/Inventory/Non-ATP/wc-dataload.xml
- dataload ../samples/DataLoad/Inventory/Non-ATP/wc-dataload.xml
- Extended sites store
- ./dataload.sh ../samples/DataLoad/Inventory/Non-ATP/wc-dataload-for-esite.xml
- dataload ../samples/DataLoad/Inventory/Non-ATP/wc-dataload-for-esite.xml
- B2C or B2B store
Inventory flags
Value | Description |
---|---|
0 |
This is the default value for INVENTORYFLAGS, and it does not put any additional condition related to QUANTITY. Placing an order with less than 1 actual QUANTITY and INVENTORYFLAGS value of 0 is not possible. |
1 |
This value indicates noUpdate. The default
Placing an order with less than 1 actual QUANTITY and INVENTORYFLAGS value 1 is not possible. |
2 |
This value indicates noCheck. The default
Order can be placed when actual QUANTITY is less than 1, and INVENTORYFLAGS value is 2 because there is no check on QUANTITY. In the
com.ibm.commerce.inventory/wc-admin-component.xml
file, the |
4 |
This value indicates actualQuantity. The
default Order can be placed when actual QUANTITY is less than 1, and INVENTORYFLAGS value is 4 because there is no check on QUANTITY. |
Loading data for inventory flags
You cannot use the Data Load utility to update the value of INVENTORYFLAGS. The default value of INVENTORYFLAGS is 0. Update it directly using the following SQL statement after the data has been loaded: update inventory set inventoryflags=xx where CATENTRY_ID in
(SELECT CATENTRY_ID
FROM CATENTRY
WHERE partnumber like 'Cords%'
or partnumber like 'Classic pleated dress pant%'
or partnumber like 'Dress shirt%'
or partnumber like 'Casual shirt%'
or partnumber like 'Bodysuit%');
Verifying the results
Verify that the data has been loaded by running the following SQL statement:
select * from INVENTORY where CATENTRY_ID in
(SELECT CATENTRY_ID
FROM CATENTRY
WHERE partnumber like 'Cords%'
or partnumber like 'Classic pleated dress pant%'
or partnumber like 'Dress shirt%'
or partnumber like 'Casual shirt%'
or partnumber like 'Bodysuit%');
If
you want to update after initial load, you can update in the CSV file and run the load
again.Cleaning up the data
delete from INVENTORY where CATENTRY_ID in
(SELECT CATENTRY_ID
FROM CATENTRY
WHERE partnumber like 'Cords%'
or partnumber like 'Classic pleated dress pant%'
or partnumber like 'Dress shirt%'
or partnumber like 'Casual shirt%'
or partnumber like 'Bodysuit%');
: