Friday, January 7, 2011

Commerce Server Inventory System Part 2



Inventory Systems Features

The Inventory System in Commerce Server comes with many important features that aid in the real-time management of inventory for items in your catalog. These features allow you to do the following:
* Display real-time inventory conditions of your products and product variants, including in stock, out-of-stock, back-ordered, or pre-orderable.
* Filter products and product variants listings to show only those products that are currently available in stock.
* Decrement inventory levels when orders are processed.
* Receive notifications when inventory levels reach an out-of-stock threshold.
* Integrate inventory levels with LOB applications.
* Gain insight into how well products and product variants are selling.
As the Inventory System deals with physical items that can be sold, it is common to refer to items as a stock-keeping unit (SKU) rather than a product or product variant. A SKU is a unique identifier that enables a product to be tracked for inventory purposes.

Inventory Conditions

There are two primary inventory conditions that exist for your SKUs: in stock and out-of-stock. When a SKU is in stock your customers should be able to purchase it normally, with each processed order decrementing the inventory total for the SKU. When a product is out-of-stock, however, special handling conditions may apply.
The easiest way to handle out-of-stock inventory is to not show it on the Web site, thereby preventing customers from purchasing the SKU. While this is a simple way to handle out-of-stock inventory, it is probably not an acceptable solution for most online Web sites. Instead, many Web sites prefer to display out-of-stock inventory as back-ordered. Back-ordered indicates that the SKU is temporarily out-of-stock. Typically a back-order availability date is also displayed with the SKU, indicating the earliest date that the back-ordered SKU is available. It is possible to still allow the customer to purchase back-ordered SKUs and indicating to the customer that the order cannot be fulfilled until the inventory has been replenished.
In addition to the back-ordered inventory status, a SKU may be listed as pre-orderable. A Web site may want to list a SKU as pre-orderable, indicating that the SKU is not in stock and is not available until a future availability date. Marking SKUs as pre-orderable is a popular way to satisfy the demands of customers that want to purchase popular items before they are available. Allowing the pre-order of SKUs is quite popular in the book publishing industry, and is how many books end up as best sellers before they are even published.
If a SKU is both pre-orderable and back-ordered, the Inventory System first uses the associated pre-order limit to satisfy purchases. Once this limit has been exceeded, the back-order limit is then applied. Once both the pre-order and back-order limits have been exhausted, the SKU is then considered out-of-stock and no available for purchase.
Figure 4-2
Figure 4-2 shows the possible purchasing conditions that can exist for SKUs in the Inventory System. If an item is in stock, then it is available for purchase. If an item is out-of-stock, then it is either not available for purchase, back-orderable, or pre-orderable. It is important to recognize that while the Inventory System may have various conditions attached to SKUs (such as back-ordered or pre-orderable) the Web site itself must manage these conditions appropriately. Unless you use the Starter Site, your Web site will not automatically associate these purchasing states to the SKUs. You have to develop your Web site to respond in this fashion, through the Inventory APIs.

Integration into the Orders System

The Inventory System is able to work directly with the Orders System so that inventory levels remain accurate and the customer’s orders are processed appropriately. The interaction between these two systems through the use of two pipeline components: CheckInventory and UpdateInventory.
The CheckInventory pipeline component is part of the Basket pipeline and checks the inventory status for SKUs in the customer’s basket. This component will return information to the Web site that indicates the current condition of the SKU. Based on the condition of the SKU, the Web site can then render the customer’s basket appropriately.
The UpdateInventory pipeline component is part of the Checkout pipeline, and checks the inventory status for SKUs and updates the SKU quantities in the Inventory System. In addition to updating inventory quantities for the SKUs, this component also handles out-of-stock conditions. If there are multiple SKUs currently being processed, and one is out-of-stock and is not back-orderable or pre-orderable, the other SKUs are not processed.
Both the CheckInventory and UpdateInventory pipeline components have the ability to return warnings and errors through the pipeline. The Web site can then respond to these warnings and errors appropriately.

Additional Inventory Features

The Inventory System also includes the following features:
* Inventory APIs. The Inventory APIs allow developers to directly interact with the Inventory System.
* Imports and exports of data. Inventory data can be imported and exported either using the Catalog Manager or by directly using the Inventory APIs.
* Bulk updates and deletions. With bulk updates and deletions, you have the ability to update or delete multiple SKUs in the inventory catalog from a single operation.
* Transactional operations. All operations performed during an import or an export can be run in a transaction, so that any errors that occur cause the entire operation to roll-back.
* Integration into LOB systems through BizTalk adapters. The Commerce Server BizTalk adapters allow you to integrate the Inventory System with other LOB systems.
* Full text search. All metadata associated with the Inventory System can be searched and queried along with metadata from the Catalog System.
While the Inventory System has a rich set of inventory management functions, it may not satisfy the inventory needs of all companies. The Inventory System for Commerce Server is an extension of the Catalog System designed to provide real-time management of inventory. Consequently, the Commerce Server Inventory System does not provide any warehousing, manufacturing, or logistical information about the inventory. If your company has these types of requirements you will need to weigh the benefits of using a third party application or extending and customizing the Inventory System. In some situations it may be best to purchase a 3rd party application to manage and control these processes, and utilize the BizTalk adapters to integrate it into Commerce Server.

Based on my book on Commerce Server. Part 3 is here.