Is there a simple way and less credit cost to get the Products On order
like in dashboard (for a list of products) https://nimb.ws/uoIBKW ?
Hi @varun!
You could use a Query like this one that will cost you 6
query{
product(sku: "1122335050"){
request_id
complexity
data {
warehouse_products{
inbounds (status:"pending",first:5) {
edges{
node {
sku
quantity
quantity_received
quantity_rejected
sell_ahead
}
}
}
}
}
}
}
Would that work for you?
Thanks in advance!
Tom
Hi @tomasw
Thank you for your quick reply.
I’m trying to get On Order at least for 10 products at once.
The cost of my current query is 101 credits, and if I’m increasing inbound it’s also increase the cost of request.
query {
products{
complexity
data(first:10, sort: "-created_at") {
pageInfo{
hasNextPage
hasPreviousPage
startCursor
endCursor
}
edges {
node{
id
account_id
name
sku
warehouse_products{
on_hand
allocated
backorder
inbounds(first:10, status:"pending"){
edges{
node{
po_id
quantity
quantity_received
quantity_rejected
po_date
}
}
}
}
images{
src
}
}
cursor
}
}
}
}
Hi @varun
That is correct, the cost is based on the following calculation:
First 10 products, and the first 10 Purchase Orders for each of them + the 1 by default (10 * 10 + 1).
You could try by lowering the number of Purchase Orders (inbounds). Usually, there is 1 or 2 Purchase orders for a product
Let me know if that still won’t wor for you
Thanks again!
Tom