Share via


How to Determine SKU Condition

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Commerce Server uses different algorithms to determine the current condition of a stock-keeping unit (SKU) for products and product families.

Algorithm for Products and Variants

The following algorithm is used to determine the SKU condition for products and variants.

If the product catalog is not mapped to an inventory catalog:
BEGIN
    If (Treat missing as OutofStock) = true
        Inventory SKU condition = OutofStock
    Else 
        Inventory SKU condition = InStock
END
Else
BEGIN
    If Stock Handling = 0
        BEGIN
            If stock status = Disabled
                Inventory SKU condition = OutofStock
            Else If stock status = Ignored
                    Inventory SKU condition = InStock
            Else If stock status = Enabled
            BEGIN
                If OnHand Quantity > Effective Stockout Threshold
                    Inventory SKU condition = InStock
                Else
                    Inventory SKU condition = OutofStock
            END
        END
    Else If Stock Handling = 1
        BEGIN
            If stock status = Disabled
                Inventory SKU condition = OutofStock
            Else If stock status = Ignored
                Inventory SKU condition = InStock
            Else If Stock status = Enabled
            BEGIN
                If OnHand Quantity > Effective Stockout Threshold
                    Inventory SKU condition = InStock
                Else If (Product is Preorderable AND OnHand Quantity > (Effective Stockout Threshold + PreorderLimit)
                    Inventory SKU condition = Preordered
                Else If (Product is Backorderable AND OnHand Quantity > (Effective Stockout Threshold + PreorderLimit + BackorderLimit)
                    Inventory SKU condition = BackOrdered
                Else 
                    Inventory SKU condition = OutofStock
            END
        END
END

Algorithm For Product Families

The inventory SKU condition is the combined value of the product variants in their order of priority (InStock, PreOrdered, BackOrdered, OutofStock). For example, if a product family has two variants and one of the variants is InStock and the second is BackOrdered, the inventory SKU condition of the product family is InStock.

See Also

Other Resources

Developing with the Inventory System