Inventory cache push synchronization
- Review information about APAR fixes for integration of IBM WebSphere Commerce and IBM Sterling Order Management. For more information about integrating IBM WebSphere Commerce Version 7 Feature Pack 8 (or later) with IBM Sterling Order Management Release 9.3, see WebSphere Commerce integration with Sterling Order Management. For more information about integrating IBM WebSphere Commerce Version 7 Feature Pack 5 (or later) with IBM Sterling Order Management Release 9.2.1 (or later), see WebSphere Commerce integration with Sterling Order Management.
- You can integrate Sterling Order Management with WebSphere Commerce using either Direct Integration or IBM® WebSphere Enterprise Service Bus (WESB) integration. With Direct Integration, the functions to convert message content and format are performed by services in the Sterling Order Management Service Definition Framework (SDF). For information about using Direct Integration to integrate Sterling Order Management with WebSphere Commerce, see Direct Integration with 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
- 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.
- 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.
- 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.
For 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.
- The shopper adds the item to a shopping cart.
For 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.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.
- Monitor option 1 modeIf 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 modeIf 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
Note: 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:
Your configured wc-admin-component.xml file should contain the following properties:WC_eardir\xml\config\com.ibm.commerce.order-fep\wc-admin-component.xml
<!-- 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,
Where myhostname is the host_name for the URL, and webapp/wcs/stores/servlet/ is the path.http://myhostname/webapp/wcs/stores/servlet/InventoryAvailabilityAutoLoadFromFiles?dataLoadFile=W:\myhostname\samples\DataLoad\Inventory\DOM\wc-dataload-dom.xml