OBJECT
Stock
Caution: use freeToAllocateQuantity
(FTA) unless you have a good reason to opt for another field.
Quantities other than FTA require more expensive calculations, which are reflected in query complexity scores.
Quantities in Stock have the following meaning
physical ordered incoming* / \ / \ / \ freeToAllocate allocated demand - linked* unlinked*
demand
is decreased bylinked
quantity when supplier module is enabled
unshipped
= all ordered items which are not in a "sent" shipment
availableNow
=freeToAllocate
-demand
available
* =availableNow
+unlinked
*
on delivery
* = number of incoming items from supplier orders, which are present in supplier deliveries
*from the Supplier Module
Caution: neither stockOffset
from ProductVariant
, nor threshold
from Warehouse
are included in the returned
freeToAllocate
. If your integration requires them for stock calculation, you can fetch these numbers and compare
to the returned stock values.
link GraphQL Schema definition
1 type Stock { 2 # Free to allocate (FTA) is the quantity to use in most cases: what is available for purchase and allocation 3 # to new orders at the moment. The FTA does not include possible warehouse threshold nor variant's stock offset. 4 Int! : 5 6 # Physical is what is on warehouse shelf, both FTA and already allocated to orders. 7 Int! : 8 9 # Quantity assigned to orders, but not shipped yet. 10 Int! : 11 12 # What is ordered, but not allocated yet, and not linked to a purchase (supplier) order. Usually backorder and/or 13 # preorder. 14 Int! : 15 16 # The quantity of ordered products, allocated or demand, but not yet shipped. 17 Int! : 18 19 # This is the amount of products available to allocate to orders minus the stock that has created demand. 20 Int! : 21 22 # Required permission: ProductSize:read 23 ProductSize! : 24 25 # Required permission: Warehouse:read 26 Warehouse! : 27 28 # This field is only populated if you are using the Supplier Module and have purchase orders with products that are not 29 # yet delivered. 30 Int! : 31 32 # The part of incomingQuantity, which is already linked to orders. It decreases demandQuantity. 33 Int! : 34 35 # The part of incomingQuantity, which is not linked to orders. It also increases available quantity. 36 Int! : 37 38 # This field is populated if a product is on a purchase order delivery that has not yet been accepted. 39 Int! : 40 41 # Total stock, which is or will be available: FTA - demand + unlinked incoming quantity. 42 Int! : 43 44 }