Purchase Orders filters

I am trying to create an inventory feed integration. My current goal is to find out how much of each item is “inbound”, where we have created a Shipping Plan for the item but the Item has not yet been received. I was planning on grabbing all POs which were created or updated the day before.

I am wondering if there are plans to include date filters for the Purchase Orders (similar to Orders having an order_date_from and order_date_to). If we have these filters for Purchase Orders then I could grab just yesterday’s POs. Or perhaps there is an alternative that would work to find out what inventory is inbound?

Inventory changes is the change in on_hand, so this would not cover the gap I’m looking to fill, correct?

Thanks in advance!

Hi @statonjm !
For the filter of POs you need, it would be for the date you expect the PO, and not the date it was created, Did I get that right?

As for inventory_changes query, it should show you changes on the on_hand but only for the items that have already been received from the POs.

Thanks!
Tom

Hey @tomasw, thanks for the quick reply!

Regarding the PO dates, I am really looking for the equivalent of both the created and updated dates. That way, I can send in 2 requests to get all the info I need:

  1. all POs created yesterday
  2. all POs updated yesterday

This would enable me to always have up to date information on the status of all POs.

Perhaps I am not sure what the meaning of “expect the PO” is! But it sounds like it is an estimate for when the inventory will be received. My issue with using that as a field would be if the inventory is received before or after that expected date, then it will throw off my inventory counts!

Thanks for confirming about the inventory_changes request. Appreciate the help!

Hi @statonjm !
For updated_at we don’t have that info for PO’s, its only available for the line items inside those PO’s.
Would a filter for created_at for PO’s work for you?

You are right about po_dat, it’s an estimate for when the inventory will be received

1 Like

@tomasw thanks for the reply!
Thanks for the tip about updated_at being available for the lines within the PO, as well as confirming my assumption for po_date. I think the created_at date would be a useful filter, as I would then be able to create one workflow which grabs POs that were created yesterday, then another workflow that can lookup information using the purchase_order query.

Once a PO is closed (indicated by date_closed field + fulfillment_status), then all inventory has been accounted for, correct? In other words, I wouldn’t expect any changes to inventory being received.

Also, have you all considered using an update field for POs? Myself and others would definitely have less of a footprint if we could filter by this field! Right now I would have to query all open POs everyday until they close, vs. using the filter to just grab the relevant POs!

Hi @statonjm !

Great!, I’ll already submit a request for that filter (created_at). I’ll let you know as soon as I have an update on that.

You are right about the date_closed, the idea is that after that date you shouldn’t expect any changes to inventory being received, as it has already been closed.

As for the updated_at we don’t currently store that, but I’ll also ask if this is possible and let you know.
Thanks again!
Tom

1 Like

Awesome @tomasw , thanks for the help, glad to see that you all are open to hear requests and implement! Very cool.

1 Like

Wanted to comment on this area as well. I am in agreeance that if we can get an updated at field that we can filter on that would be a huge win. Or at least an area to pull in purchase order history and then we can have the opportunity to create a job that will update that information for each time something is changed would be great.

@tomasw - any update on this type of request being implemented?

Thanks,
rubix3

Hi @rubix3 !
So far I don’t have any update, but can say that the request has already been assigned to an Engineer.
I’ll be talking to him on Monday to see if this can be expedited or if I can provide a better ETA.
I also asked about the updated_at & purchase_order_history, to see if thats something possible to have.
I appreciate your patience and I will let you know as soon as I get a response on that.
Thanks!,
Tom

Hi @rubix3 & @statonjm

This should be available now.
A query like this one should work for the created_at:

query{
  purchase_orders(created_from: "2020-02-14", created_to: "2020-02-15"){
    request_id
    complexity
    data(first:10){
      edges{
        node{
           id
    legacy_id
    po_number
    account_id
          created_at
        }
      }
    }
  }
}

And this should return purchase orders with a created_at date between 2020-02-14 and 2020-02-15.
I will let you know as soon as I get a response about the purchase_order_history request (updated_at will not be implemented unfortunately)
Thanks for the patience on this!
Tom

Hello @tomasw -

Thank you for the update! I am very appreciative of the addition of a created_at date that will allow me to pull in new purchase orders more efficiently. I do hope that the team considers adding in the updated_at field because of it’s more universal approach. Essentially, if that field was available you wouldn’t necessarily need the created_at field because for new PO’s they should essentially be the same or at the very least would be within the window you are looking for when bringing in information. Given that there are only 700 credits to spare, the amount of time it will take to bring in this information will grow as a business grows making it harder for us to scale out our product to bring in information.

Is there another solution available that we can leverage to pull this information? (Specifically for purchase order history and only pulling in updated purchase order lines)

Thanks,
-Nick

1 Like

Hi @rubix3
I apologize for keeping you waiting on this.
Unfortunately, my request has been turned down, for the time being, we will only have created_at and closed_at as filters. Either updated_at or purchase_order_history will not be developed at the time.
What I think it might be helpful is a webhook for this, we currently have this one that might be helpful:

https://shipheropublic.docs.apiary.io/#reference/webhooks/order-canceled-webhook-url/purchase-order-update-webhook-url

Please let me know if there’s anything else I can assist you with.
Thanks!,
Tom