Develop > Controller layer > Integrate with back-end systems and external applications > Distributed Order Management (DOM) integration
Inventory availability caching
The inventory availability master information typically resides on one or many backend inventory management systems (IMS).
Some backend inventory management systems, for example, legacy in-store systems, may have performance, scalability and availability limitations. The Inventory component and its services are designed with caching support to address these limitations. That is, the inventory availability of an item at a location can be cached by the component, either in memory, or in the database. This results in the DOM inventory configuration and availability not being controlled by WebSphere Commerce Accelerator. Instead, WebSphere Commerce records the inventory information in the local database cache or memory cache, and the master data is contained in an external inventory system.
Inventory configurations and related data are stored in the following WebSphere Commerce database tables:
WebSphere Commerce database tables
Table name Description INVCNF Represents DOM inventory cache configurations. INVCNFREL Represents the relationship of an item and/or location with an inventory configuration. INVAVL Represents an inventory availability record cached by the WebSphere Commerce database.
The Inventory component's caching support includes the following features:
Cache records
It can cache at most one inventory availability record for each combination of item and location.
Each cached record contains the following information:
- Inventory status, for example, available, backordered, and unavailable.
- Available quantity.
- Availability date.
- Availability offset, useful for delivery and buy online, ship to store scenarios where the availability date is based on a lead time (offset), rather than absolute date.
- Last update date.
It can cache an inventory availability record in memory or in the database, depending on the inventory configuration of the item and location.
A WebSphere distributed object cache is used to cache inventory availability records in memory. Advantages of using a WebSphere distributed object cache include:
- It works in a clustered environment.
- It can be configured and managed using the Cache Monitor.
Cache inventory availability records in memory is useful when it is either impossible or undesirable to batch-load the records into the database. For example:
- Export all inventory availability records from a legacy in-store system will block it for an unacceptably long period of time.
- A retailer has a large product assortment and number of store locations, and costs of importing all inventory availability records into the database outweighs the savings from caching the information.
Cached records are updated when:
- A cached record is refreshed by a real-time service request to the backend system when the cached record has expired.
- Cached records are decremented when an order is submitted for processing.
- Cached records are updated by batch-load and by SyncInventoryAvailability service requests.
Cache updates can trigger JSP file cache invalidations. However, this should not be considered a replacement for efficient store design. The design phase should emphasize balancing performance and usability considerations.
Inventory configuration
A retailer can setup multiple inventory configurations and apply them to different items and locations. For example, the retailer can setup:
- A default inventory configuration applicable to all items and locations.
- An inventory configuration applicable to only a particular location, for example, one managed by a legacy in-store system, that overrides the default inventory configuration.
- An inventory configuration applicable to only certain promotion items that overrides the preceding inventory configurations.
Each inventory configuration contains the following options:
- Precedence
- Threshold quantity
- Expiry time of a cached record when the available quantity is greater than or equal to the threshold quantity.
- Expiry time of a cached record when the available quantity is less than the threshold quantity.
- Priority of a cached record, used by the distributed object cache to determine which cached records to purge in case of cache overflow.
- Fallback values, used when the backend system is offline.
- Additional options that control:
- Where the records should be cached, in memory and/or in the database.
- Whether real-time service requests should be made to the backend system.
- When the cached records should be decremented and/or updated.
Examples of inventory configuration include:
- A typical inventory configuration for items that do not require high inventory availability accuracy:
- Invalidates cached records very infrequently above threshold.
- Invalidates cached records somewhat frequently below threshold.
- An inventory configuration for legacy in-store systems with limited connectivity:
- No threshold.
- Never invalidates cached records.
- Real-time service requests to backend system disabled.
- An inventory configuration for items that require high inventory availability accuracy:
- High threshold.
- Invalidates cached records somewhat frequently above threshold.
- Invalidates cached records very frequently below threshold.