Ongoing WMS logo

Ongoing WMS Developer

Stock balances and inventory

Table of contents

Introduction

The inventory describes which articles are in stock. There are several different functions for retrieving the inventory data from the API:

Note that these functions also return the basic article data (such as weight, dimensions and description) for each article. There is no separate function for getting the basic article data. Thus, in order to get the article registry, GetInventory should be used.

Sellable number of items

When you call GetInventory and GetInventoryByQuery, the response will contain a field called SellableNumberOfItems. This is the number of items which can still be sold. If you create an order for an item, then the sellable number of items will be decreased accordingly.

If the article is a kit article (that is, an article which is defined in terms of other articles), then SellableNumberOfItems will be the minimum of the sellable number of items of each sub-article.

If you are integrating with a web shop and wish to display the remaining quantity which can be sold, then SellableNumberOfItems is the field to use.

This value may be negative.

Physical stock balance

When you call GetInventory and GetInventoryByQuery, the response will contain a field called NumberOfItemsDecimal. This is the number of items which are physically present in the warehouse.

This value will always be greater than or equal to 0.

Advanced topics

We believe that most integrations will never need anything other than SellableNumberOfItems or NumberOfItemsDecimal (described above). But if you are interested in the advanced details of how Ongoing WMS handles stock balances, we have described them below.

The different quantities in GetInventory and GetInventoryByQuery

When you call GetInventory and GetInventoryByQuery, the response will contain several different quantities for each article:

NumberOfItemsDecimal

NumberOfItemsDecimal is the total, physical stock stored in the warehouse.

NumberOfBookedItemsDecimal

NumberOfBookedItemsDecimal is the number of items which have been ordered but which have not yet been picked.

AllocatedNumberOfItems

AllocatedNumberOfItems is the number of items which have been allocated to orders but have not yet been picked. Some warehouses use this two-step process of first allocating goods, and then picking them. Other warehouses use a one-step process (directly picking the goods), in which case AllocatedNumberOfItems will always be 0.

NumberOfLockedItems

NumberOfLockedItems counts article items where either:

LockedForSaleNumberOfItems

LockedForSaleNumberOfItems counts article items where either:

ToReceiveNumberOfItems

ToReceiveNumberOfItems has no relationship to the rest of the values. It describes how large a quantity of goods is expected to arrive in the warehouse, that is, how large a quantity exists on a purchase order but is not yet received.

PickedToBeCollectedNumberOfItems

PickedToBeCollectedNumberOfItems is the number of items which have been picked by the warehouse, and which are on orders whose statuses are strictly below "Collected" (< 500). That is to say, this is the number of items which have been picked by the warehouse but where the warehouse does not yet consider the orders to be completely done. This field is generally only used by ERP integrations when running the daily stock comparison.

ReceivedToBeFinishedNumberOfItems

ReceivedToBeFinishedNumberOfItems is the number of items which have been received and which are on inorders whose statuses are strictly below "Received" (< 500). That is to say, this is the number of items which have been received by the warehouse but where the warehouse does not yet consider the inorders to be completely done. This field is generally only used by ERP integrations when running the daily stock comparison.

SellableNumberOfItems

This is the number of items which can still be sold. If you create an order for an item, then the sellable number of items will be decreased accordingly.

This figure is derived (using a formula) from the other quantities. The formula is defined as:

SellableNumberOfItems = NumberOfItemsDecimal - NumberOfBookedItemsDecimal - LockedForSaleNumberOfItems + AllocatedNumberOfItems

If the article is a kit article, then its SellableNumberOfItems will be the minimum of the SellableNumberOfItemss of all the sub-articles.

Venn diagram illustration

The following Venn diagram illustrates the relation between the different quantities.

Venn diagram describing the relationship between the different quantities.

Stock balance formulas

ERP daily comparison formula

In integrations with ERP systems, it is common to run a daily comparison between the stock balances in Ongoing WMS and the stock balances in the ERP. In this case, neither the physical stock balance nor the sellable balance is of interest.

What is required here is a formula which takes into account the fact that:

The formula which deals with both of these issues is:

ERP stock balance = NumberOfitems + PickedToBeCollectedNumberOfItems - ReceivedToBeFinishedNumberOfItems

The difference between GetInventory and GetInventoryItems

The fundamental difference between GetInventory and GetInventoryItems is that:

You can use GetInventoryItems to answer questions such as:

As an example, let us say that you have an article called A1 with the following items in stock:

A call to GetInventory will return NumberOfItemsDecimal = 15 for A1. But if you call GetInventoryItems, the response will contain two separate InventoryItems tags for A1: