CheckInventory
For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.
Use the CheckInventory pipeline component to check the inventory status for items in the customer's basket. You must run the QueryCatalogInfo pipeline component before you use this component.
Intended use: Order Processing pipeline, Product Info stage.
Values Read
The CheckInventory pipeline component reads the following values from the indicated dictionaries.
Key |
Dictionary |
Description |
---|---|---|
product_catalog |
Order |
The name of the product catalog. This weakly typed key is mapped to the strongly typed ProductCatalog property of a LineItem object. |
product_id |
Order |
The product ID. This weakly typed key is mapped to the strongly typed ProductId property of a LineItem object. |
product_variant_id |
Order |
The variant ID. This weakly typed key is mapped to the strongly typed ProductVariantId property of a LineItem object. |
quantity |
Order |
The quantity requested on the order form. This weakly typed key is mapped to the strongly typed Quantity property of a LineItem object. |
CommerceResources |
Context |
The CommerceResourceCollection that contains all the resources for the site. |
MessageManager.pur_out_of_stock |
Context |
The error message text. |
Values Written
The CheckInventory pipeline component checks the inventory and writes the following values to the order form.
Key |
Description |
---|---|
_inventory_condition |
A value that specifies the current condition of the specified product or variant in the inventory. The values can be BackOrdered, InStock, OutofStock, or PreOrdered. This weakly typed key is mapped to the strongly typed InventoryCondition property of a LineItem object. |
_inventory_in_stock_for_request |
The available in-stock quantity to satisfy the request. This weakly typed key is mapped to the strongly typed InStockQuantity property of a LineItem object. |
_inventory_back_order_for_request |
The available back-order quantity to satisfy the request. This weakly typed key is mapped to the strongly typed BackorderQuantity property of a LineItem object. |
_inventory_pre_order_for_request |
The available pre-order quantity to satisfy the request. This weakly typed key is mapped to the strongly typed PreorderQuantity property of a LineItem object. |
_Basket_Errors |
Error messages are written to this SimpleList object. |
Remarks
Each line item in the order form receives one of these values.
If an item is out of stock, the CheckInventory pipeline component writes a warning to the _Basket_Errors collection and returns a warning.