Introduced in Feature Pack 3

Inventory cache push synchronization

The Sterling Commerce Order Management Real-time Availability Monitor (RTAM) is used to generate both inventory availability Data Load utility CSV files for batch updates, and SyncInventoryAvailability service requests for further adjustments. This monitor enables better control for synchronizing the WebSphere Commerce inventory cache, and reduces the dependency on polling.
Important: Review the following information for your version of WebSphere Commerce:

The purpose of this inventory cache is to minimize the amount of network traffic between WebSphere Commerce and Sterling Order Management. It reduces the number of calls to Sterling Order Management when, for example, a shopper is browsing inventory on the WebSphere Commerce storefront. To keep the cache up to date, RTAM pushes inventory information to WebSphere Commerce when the inventory level of an item gets lower than the pre-configured threshold. WebSphere Commerce can pull inventory information and refresh the inventory cache for a product when the cache is either above or below the pre-configured threshold. These inventory push-and-pull strategies mitigate potential performance issues during peak usage times

To support inventory cache push synchronization, imports (WCInventoryServicesImport, CSVFileImport) are added to the mediation module. The sample data load assets can be found under the components/sterling-integration/samples/DataLoad/Inventory/DOM directory.
Inventory cache synchronization support
Where:
  1. RTAM detects the inventory level change and raises the REALTIME_AVAILABILITY_CHANGE event. An event handler that is associated with the event sends the REALTIME_ATP_MONITOR REALTIME_AVAILABILITY_CHANGE XML to the Sterling Commerce DOM integration mediation module.
  2. The Sterling Commerce DOM integration mediation module transforms the REALTIME_ATP_MONITOR REALTIME_AVAILABILITY_CHANGE XML to a SyncInventoryAvailability BOD and sends the BOD to the WebSphere Commerce SyncInventoryAvailability service.
  3. The shopper locates the item by browsing or searching the catalog in the WebSphere Commerce storefront. The WebSphere Commerce storefront uses the WebSphere Commerce GetInventoryAvailability service to fetch and display the inventory availability of the item online and in-store.

    Introduced in Feature Pack 3For a prebuilt or static kit, its inventory availability is fetched at the kit level. For a dynamic kit with a pre-configuration, the inventory availability of the pre-configuration is computed from the inventory availability of its components by the online storefront. For example, a preconfiguration with 1 of X and 2 of Y is considered available if there is at least 1 of X and at least 2 of Y available. For a dynamic kit without a pre-configuration, no inventory availability is displayed.

  4. The shopper adds the item to a shopping cart.

    Introduced in Feature Pack 3For a dynamic kit, the shopper performs a punch out to the Sterling Configurator to configure the dynamic kit before the kit is added to the shopping cart.

    The WebSphere Commerce storefront uses the WebSphere Commerce ChangeOrder service to add the item to the shopping cart.

    Introduced in Feature Pack 3 The WebSphere Commerce ProcessInventoryRequirementCheckInventoryActionCmd task command uses the same logic noted previously to compute the inventory status of dynamic kits in the shopping cart.

To configure Inventory cache push synchronization, see Installing, Configuring and Deploying: SSFS with RTAM.

Introduced in Feature Pack 3Note: For inventory push:
  • Monitor option 1 mode
    If the inventory push is triggered in monitor option 1 mode, the available change message from Sterling Order Management is routed to the SyncInventoryAvailability BOD. This message is also sent to the WebSphere Commerce SyncInventoryAvailability service. To trigger inventory cache push synchronization in monitor option 1 mode, run the following command:
    
    ./triggeragent.sh TEST_RTAM_CRITERIA_OP1
    
  • Monitor option 3 mode
    If the inventory push is triggered in monitor option 3 mode, the available change message from Sterling Order Management is routed to the SyncInventoryAvailabilityCSV. The WebSphere Enterprise Service Bus adds the record to the InventoryAvailability.csv file (The location of the file is defined by environment variable CSV_DIR). You can load the CSV file to WebSphere Commerce using the Data Load utility or by using a scheduler. To trigger inventory cache push synchronization in monitor option 3 mode, run the following command:
    
    ./triggeragent.sh TEST_RTAM_CRITERIA_OP3
    
    Feature Pack 6 or laterNote: If Sterling Commerce sends SyncInventoryAvailability to WebSphere Commerce, a new scheduler, InventoryAvailabilityAutoLoadFromFiles is available to load the inventory availability CSV file when the inventory push is triggered in monitor option 3 mode. To run this scheduler, you must configure properties within the following file:
    WC_eardir\xml\config\com.ibm.commerce.order-fep\wc-admin-component.xml
    Your configured wc-admin-component.xml file should contain the following properties:
    <!-- 
    	copyFrom: all of the new CSV files are under this directory
    	copyTo: after the CSV files picked up by scheduler job, they will be copied to copyTo directory
    	loggingDir: the logging files are created under this directory
    	-->
    	  <_config:configgrouping name="DOMInventoryAutoLoad">
                <_config:property name="copyFrom" value=""/>
                <_config:property name="copyTo" value=""/>
                <_config:property name="loggingDir" value=""/>
            </_config:configgrouping>
    If you are logged into the WebSphere Commerce Administration Console as site administrator, you can also run this scheduler directly with a URL. The URL must contain the parameter dataLoadFile that specifies the absolute path of the data load configuration file. For example:
    https://host_name/path/InventoryAvailabilityAutoLoadFromFiles?dataLoadFile=W:\myhostname\samples\DataLoad\Inventory\DOM\wc-dataload-dom.xml
    Where the host_name is the fully qualified name of your WebSphere Commerce Server, and the path is the configuration path. The host_name and the path are determined based on how WebSphere Commerce is installed. For example,
    http://myhostname/webapp/wcs/stores/servlet/InventoryAvailabilityAutoLoadFromFiles?dataLoadFile=W:\myhostname\samples\DataLoad\Inventory\DOM\wc-dataload-dom.xml
    Where myhostname is the host_name for the URL, and webapp/wcs/stores/servlet/ is the path.