Samples > Data load utility samples > Inventory samples


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 ususally used to update some catentry's 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 seperately after loading catalog entry, FulfillmentPropertyMediator should be used in order not to touch catalog entry's data.


Procedure

  1. Navigate to the appropriate directory:

  2. Enter the following command:

    • dataload.sh ../samples/DataLoad/Inventory/ATPConfiguration/wc-dataload.xml

    • 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.


Verififying results

Verify that the data has been loaded by running the following SQL statements:

  1. 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
    

  2. 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
    

  3. 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
    


Clean 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, you can refer to catalog entry's Cleanup.sql, then all catalog entry related data will be cascade deleted.


+

Search Tips   |   Advanced Search