Previous in Contents Next in Contents

Inventory and Backordering

How you manage inventory in your site depends largely on how you want to respond to a situation in which a given item is out of stock. In such a situation, you can either place the item on backorder, or you can notify the customer that the item is not currently available.

The FlagInventory and LocalInventory components, which have an affinity with the Inventory stage, coordinate with the QueryProdInfoADO component (Product Information stage) to support either response.

Flag Inventory Checking

The FlagInventory component is designed to identify items in the items SimpleList that are out of stock. When this component runs, it iterates through the items in the items SimpleList to verify that the _product_in_stock name/value pair for a given item is not zero (0).

If the _product_in_stock name/value pair evaluates to zero (0), FlagInventory can respond in either of several ways. The component supports a Disallow Backorder property, which you set using the component's property page. If the Disallow Backorder check box is selected, and evaluates to 0, FlagInventory adds a _pur_out_of_stock message to the _Purchase_Errors SimpleList. If Disallow Backorder is not selected, and _product_in_stock evaluates to zero (0), then the _inventory_backorder name/value pair for the affected item is set to zero (0).

Note  If you include the FlagInventory component in your pipeline, but do not design the query that you execute in the Product Information stage to reference the in_stock column in your product table, the component fails.

Quantity-Based Inventory Checking

The LocalInventory component compares the number of units in the Quantity name/value pair to the number in the _product_local_inventory name/value pair. The _product_local_inventory value pair should represent the actual number of items in stock. If the Quantity exceeds _product_local_inventory, the difference between these two numbers is written to the _inventory_backorder name/value pair, provided that LocalInventory is configured to allow backordering. Otherwise, LocalInventory, like FlagInventory, writes a _pur_out_of_stock message to the _Purchase_Errors SimpleList.

If you include the LocalInventory component in your site's pipeline, the script that you use to display the basket to customers should be written to notify them that a requested item is either out of stock or on backorder.

Note  If you include the LocalInventory component in your pipeline, but do not design your Product Information query to reference the local_inventory column in your product table, LocalInventory fails.


© 1997-2000 Microsoft Corporation. All rights reserved.