Sample: Loading ATP configuration information for a catalog entry
This sample shows how to use FulfillmentPropertyMediator to load a catalog entry's ATP Configuration data. We also call ATP Configuration as Fulfillment Property.
About this sample
This sample is usually used to update some catentry fulfillment property, such as, whether the catentry can be backordered. The fulfillment property is loaded together with loading catalog entry if the store is a ATP store. If the store is a non-ATP store, ATP configuration is not supported. ATP configuration(fulfillment property) can be loaded using CatalogEntryMediator as loading catalog entry data. But if customer wants to update the fulfillment property separately after loading catalog entry, FulfillmentPropertyMediator should be used in order not to touch catalog entry's data.
Procedure
(Developer) On a command line, go to the WCDE_installdir\bin directory.
- (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.- Enter the following command:
- (Linux) dataload.sh ../samples/DataLoad/Inventory/ATPConfiguration/wc-dataload.xml
(Developer) dataload ../samples/DataLoad/Inventory/ATPConfiguration/wc-dataload.xml
First, the loader defined in wc-fulfillment-property-loader.xml loads all sample catalog entry records' fulfillment property fromFulfillmentProperty.csv into corresponding database tables.
Verifying results
Verify that the data has been loaded by running the following SQL statements:
- This SQL statement returns the base item data.
SELECT BASEITEM_ID,ITEMTYPE_ID,QUANTITYMEASURE,MARKFORDELETE,PARTNUMBER,QUANTITYMULTIPLE FROM BASEITEM 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%' ORDER BY baseitem_ID
- This SQL statement returns the store item data.
SELECT BASEITEM_ID,STOREENT_ID,TRACKINVENTORY,FORCEBACKORDER,RELEASESEPARATELY,CREDITABLE, BACKORDERABLE,RETURNNOTDESIRED,MINQTYFORSPLIT FROM STOREITEM WHERE baseitem_id in (SELECT BASEITEM_ID FROM BASEITEM 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%') ORDER BY baseitem_id
- This SQL statement returns the item specification data.
SELECT ITEMSPC_ID,MARKFORDELETE,BASEITEM_ID,DISCONTINUED,PARTNUMBER FROM ITEMSPC 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%' ORDER BY ITEMSPC_ID
Cleaning up the data
There is no Cleanup.sql for this sample. Because before running this sample, there is a pre-condition. That is to use CatalogEntryMediator to load catalog entry data for ATP store. To totally delete the ATP Configuration data, we can refer to catalog entry's Cleanup.sql, then all catalog entry related data will be cascade deleted.