Supply: Inventory Level special codes

Modified on Thu, 3 Apr at 9:51 AM

In-stock quantity usually returns a non-negative number.

However, sometimes negative numbers representing special codes are returned.


Here is the definition for these special codes:

-1: "Non-Stocked"

-2: "Yes" (generic, unspecified quantity but is in stock)

-3: "Unknown" (no quantity value is provided, or the value was not an integer)

-4: "RFQ"




Sometimes, inventoryLevel returns 1, but there are no distributors with inventory. This behaviour can be attributed to the presence of brokers with inventory. The breakdown below is also true of avgAvail.


  • If there are normal distributors with inventory level, the totalAvail is the stock level of just those distributors.
  • If there are no distributors with inventory level, the algorithm will look at brokers. If there is one or more brokers that has inventoryLevel >0 or inventoryLevel == -2 (a special inventoryLevel code), then totalAvail == 1. The algorithm will never take the numerical value of the inventory level of the brokers into account (other than adding 1 to the inventoryLevel).

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article