Select version
v7.7 v7.6 v7.5 v7.3 v7.1 v7.0 v6.8 v6.7 v6.6 v6 v5 v4 v3 v2

Inventory Management with uCommerce

When uCommerce was introduced to the world at Codegarden ‘09 one of the things we demoed was how to build simple inventory management using the API and pipelines.

The great thing about pipelines is that they’re very easy to extend so we didn’t think to actually include the inventory tasks; until now that is.

What does it do

The pipeline tasks are pretty simple and do one thing: During checkout one task looks for a field on your product definition called “InventoryOnHand” if found decrements that field with the quantity ordered by the customer. It’s that easy.

Now inventory management wouldn’t be complete if it didn’t support returns as well. So a second task is configured to run as part of the order processing flow in the backend of uCommerce. If an order is moved to a cancelled state the task looks for that same field once more and increments “InventoryOnHand” with the quantities found on each order line.

Setting it up

As mentioned the inventory tasks “DecrementInventoryOnHand” and “IncrementInventoryOnHand” looks for a field called “InventoryOnHand”. So you need to add to your product definitions for inventory management to kick in. You’re free to have the field only on some product and not on others. The tasks will adapt to whatever the case might be.

One thing to note is that if you’re operating with variants you want to add the “InventoryOnHand” field as a variant property otherwise uCommerce won’t pick it up.

If you don’t use variants just leave Variant Property off.

image

Managing Inventory Levels

With the new field in place you can now manage inventory levels on products or variants as you would any other product property.

image

Cancelled Orders

The store owner might decide to cancel an order in which case the quantites ordered need to be returned as inventory. IncrementInventoryOnHand handles this for you.

image

Pipelines

Configuring the two components and adding them to "Checkout" and "ToCancelled" pipelines can be done using the example configuration file called: Apps\SimpleInventory\InventoryOnHand.config.example

Simply remove the "example" part of the extension to activate!

Wrap Up

That’s it. With two pretty simple tasks uCommerce now has simple inventory management built right in.

uCommerce Aps - Studsgade 29B - 8000 Aarhus C - Denmark
Phone +45 61 799 997 - Email [email protected] uCommerce logo