Get any recent inventory adjustments/changes

Hi,
So I need to extract list of any recent changes to qty (for all skus) that are NOT because of SOs/POs processed.
I need to sync these changes to our partner, but they’re already receiving any SOs/POs, so sending ALL inventory changes would duplicate the effect (and they can only receive relative change, not the absolute qty number).
Pls let me know if above didn’t make sense.
Thank you

Hello @raj!

I think I got it right.

How are they receiving those updates today? (SOs and POs)

Regards,
TomasFD

Hello @tomasfd,
Oh for those I just acknowledge (via API) when we receive a PO or ship an SO. They update qty on their end correctly for this, and we’re not planning to touch that - just want to convey qty changes from other than these events.
Thank you

Hello @Raj!

The two best ways to get inventory changes are using our Inventory Update Webhook or the inventory_changes query. However, none can be filtered the way you need from our end.

You can query inventory_changes and filter them on your end, reading the reason field and discarding those that pertain to orders (“Order … shipped”) or purchase orders (“Received from Purchase Order”).

query{
  inventory_changes(warehouse_id:"string" date_from:"2022-02-01 00:00:00" ){
    request_id
    complexity
    data(sort:"-created_at"){
      edges{
        node{
          sku
          reason
          created_at
          previous_on_hand
          change_in_on_hand        
        }
      }
    }
  }
}

Please let me know if this doesn’t help.

Kind regards
TomasFD

Thank you @tomasfd! I think your second solution might just be what I need - I’ll try it right now!

1 Like