Purchase Order Data - GraphQL API

Hi,
We are trying to get below datapoints via GraphQL API call.

  1. Purchaser Order Status
  2. Purchase Order Line Item Status
  3. Warehouse Note

I see Fulfillment status with in Purchase order and PO Line Items object and both have the same values and doesn’t match with PO line Item status. Can you please let me know if its possible to fetch the above mentioned data and what those data points are?
Thanks!

Hey @kavitha,

Thanks for reaching out and Welcome to our Developer Community!

I see what you mean when you said the purchase order status and the purchase order line item status have the same value, but that doesn’t match with what the PO line item status value should be.

What field are you talking about when you mention warehouse_note?

Also, we have a PO Update Webhook that might be useful to you. It has numerous fields related to a PO whenever it is updated, such as the line item quantity, quantity received, and overall PO status. If this interests you, you can read more about it here.

Please let me know if you have any questions or concerns!

Best,
RayanP

Hi @Rayanp,
Thanks for your response. I am specifically looking to get PO level status, PO LineItem level status which I highlighted in the below screenshot.

I believe the api value for Warehouse Note which you can see in the below screenshot is packing_note. Can you please confirm if I am correct?

Is there a way to get # of Units and # of Units Recieved from PO graphql endpoint?

Hey Team,

Thanks for hanging in there!

I think your first point regarding the PO level status might not be working as intended through the api. I’m looking into this to confirm the expected behavior.

I can confirm that the warehouse note you see in that column is the packing_note under the purchase_order(s) query in the Public API.

An example query that returns the warehouse note as well as units and units received would look something similar to this:

{
  purchase_orders(warehouse_id: "string") {
    request_id
    complexity
    data(first: 5) {
      edges {
        node {
          id
          legacy_id
          fulfillment_status
          po_note
          packing_note
          line_items {
            edges {
              node {
                id
                quantity
                quantity_received
                quantity_rejected
                fulfillment_status
              }
            }
          }
        }
      }
    }
  }
}

Please let me know if you have any questions or concerns.

Best,
RayanP

Hi @Rayanp,
I was hoping to use the existing PO GraphQL api to fetch the purchase order which was updated on a certain day/days for ex- the previous day. I understand we could use the webhook but thats not something we can use right now.

I believe right now we can use created from - to, po created from -to, closed from - to dates to filter. For our use case we want updated from - to. Is that a possibility?

image

Please let me know if there is any additional information I can provide here. Any guidance here is appreciated.
Thanks!

Hey Team,

Thanks for hanging in there!

I’ll go ahead and pass along your feedback regarding this issue, as using updated_from and updated_to are not current filters for this webhook.

Please let me know if you have any questions or concerns.

Best,
RayanP

@Rayanp Do you have any updates on below items?

  1. Adding updating to the purchase order filters
  2. PO level and PO line item level status which you mentioned might not be working as intended in your earlier comments.

Thanks

Hey @kavitha,

Thanks for hanging in there!

I’ve gone ahead and escalated the PO line item and PO level status having the same value issue as a bug. I’ll let you know when a fix has been rolled out here.

I have passed along your feedback regarding using “updated” as a filter for the PO queries, but I don’t have anything to report at the moment.

Please let me know if you have any questions or concerns.

Best,
RayanP

Hi, any update on this bug? Thanks

Hi @Rayanp,
Do we have any update on the above items?
Thanks
Kavitha

Hey Team,

Thanks for hanging in there!

I have no updates to share at this moment regarding the addition of the addition of the “updated” filter for the PO Query.

The second issue that I thought was a bug, has since been passed along as feedback to add the ability to return the line item status through the PO Query as well.

Please let me know if you have any questions or concerns.

Best,
RayanP

Hi, any update on the bug?

Hi @Rayanp,

Do we have any update on adding the the updated filter for the purchase order query? And also looks like the fulfillment status issue we discussed still exists. Because of these items we are facing issues in the report we generate. Any update or timeline of when these will be fixed is greatly appreciated.

Thanks
Kavitha

Hey Team,

Thanks for hanging In there!

Unfortunately, I have no update for both instances of feedback. I’m unable to disclose most details regarding this process, but I can ensure you that I’ve passed along your concerns and sense of urgency.

Please let me know if there’s anything I can do to assist in the meantime.

Best,
RayanP

Hi @Rayanp,

Happy Monday! Just checking in to see if there is any update here?

Thanks
Kavitha

Hey Team,

Thanks for hanging in there!

Regarding the updated to and updated from filters, there is no update.

In regards to the second part, the issue of having the line items return statuses such as “received” or “under received” this will not be done. That is a calculation that is done on our front end. Therefore, no table exists in our database with that information to pull. You can discern that value through the API by comparing the expected and received quantity.

Please let me know if you have any questions or concerns.

Best,
RayanP

Hi @Rayanp,

Could you please let us know what all PO Line Items statuses we can expect and what will the comparison btw expected and received quantity will be for each status?

For ex -
Recieved > Ordered - Over Received
Recieved = Ordered - Received

Hey @kavitha,

Thanks for hanging in there!

I believe all the PO Line Item statuses you will receive are “pending” and “complete” in relation to the Purchase Order.

By comparing the expected and received quantity you can discern the “received” status that the UI shows:

if the quantity expected is 50 but you’ve received 40, it’s under received.
if the quantity expected is 50 but you’ve received 50, it’s received.
if the quantity expected is 50 but you’ve received 60, it’s over received.

Please let me know if you have any questions or concerns.

Best,
RayanP

Hi @Rayanp,

The PO line item statuses we receive via api is not always pending and complete as you mentioned. I have highlighted in the below image.

And the status show in the shiphero application doesn’t match with the api data which I have shown in the below screen shots. Its bit confusing with theses statuses. Could you please provide clarification on these mismathes and what all status we can expect for PO status and PO line items status?

Hey @kavitha,

Thanks for bringing this to my attention.
I’ll sync with the team again and get back to you on this.

Best,
RayanP