Figuring out low stock

Hello again :slight_smile:

I’m looking to pull products inventory levels, I see I can pull on_hand, however, I need to know what is actually available, i.e. on_hand - reserve/allocated

How do I get product available value?

Thank you!

-asdf

Hello again asdf!.
That’s an excellent observation… I’m taking that request to the team to work on and let you know asap.
Thanks!

2 Likes

Hi asdf!
This is an update to let you know that you should be able to see those fields now, under WarehouseProduct.
For example, you could use a query like this one:

query {
  product(sku: "some-sku-1234") {
    request_id
    complexity
    data {
      id
      legacy_id
      warehouse_products {
       id
    legacy_id
    warehouse_id
    on_hand
    reserve_inventory
    replenishment_level
    reorder_amount
    reorder_level
    backorder
    allocated
      }
    }
  }
}

Let me know if theres anything else we can help with,
Thanks!
Tom

Hey, just tried using the available and the complexity went up from 2 to 31… I found by taking out available it would drop back down to complexity of 2. Just wanted to add it to the conversation in case @asdf is also looking to maintain low complexity. For me, it worked out that I could run some script which performed the calculation after the request, just a trade off!

1 Like