Can a closed PO be reopened?

Hi there,

My colleague and I have noticed a few purchase orders that when closed and then “reopened” (i.e. changes to another status other than “closed”), the date_closed still remains.

Is it by design that the first date_closed value always remains, even if the PO does get re-opened?

All the best,
Colin

Hey @cschouten,

Thanks for reaching out!

I’ll look into this and get back to you.
Please let me know if there’s anything I can do to assist in the meantime.

Best,
RayanP

Hey @cschouten,

Thanks for hanging in there!

I’d like to double check with you on the points below:
Are you closing the PO via the API or the UI, and are you observing this via the API or the UI?

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

Best,
RayanP

Happy to clarify.

We’re closing the PO through the UI, and when we consume data through the API, we observe the status being updated; however, the date_closed value still remains.

All the best,
Colin

1 Like

Hi @sh-agent,

Any updates on this issue?

All the best,
Colin

Hey @cschouten,

Thanks for your patience!

I’ve escalated this issue to our Engineering Team to have them investigate.
I’ll update you here as soon as I learn more.

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

Best,
RayanP

Thanks @sh-agent.

On a related note, would the PO Update webhook send an update if the PO record was deleted?

The documentation reads:

This URL is the URL that you setup on your system, so we can push updates. This webhook will be called anytime a purchase order is created or updated.

All the best,
Colin

Hey @cschouten,

Could you explain further on what you mean by PO record deletion?
The webhook will also fire when a PO is set to canceled and closed.

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

Best,
RayanP

Sure thing.

We’ve encountered a few errors with one of our operational dashboard that relies on updates from the PO API endpoint. Here are two problems we’re experiencing:

  1. POs with no line items are archived on the front end, but not marked as closed or cancelled on the backend. Ex id. UHVyY2hhc2VPcmRlcjoxNTkzMzU0

  2. PO line items are removed from POs, but not marked as cancelled on the backend. Ex id. UHVyY2hhc2VPcmRlckxpbmVJdGVtOjIzMDI4NTc1

If ShipHero does send updates if something is cancelled or closed, these two aforementioned PO IDs should have an updated status via the API, but alas they do not.

All the best,
Colin

Any updates @sh-agent?

All the best,
Colin

We do have some more examples, if you need them.

All the best,
Colin

Hey @cschouten,

Thanks for hanging in there!

Regarding PO 1593354, like you said it wasn’t marked as closed or canceled so it didn’t trigger the Webhook fire. This behavior is intended, as the it’s the status of the overall PO that will trigger the Webhook.

The second id you sent was decoded into a PO Line Item, if you have the PO ID I can take a look there.

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

Best,
RayanP

We have many examples of the closed/cancelled status not showing up.

Here’s a few Purchase Order ids:

  • UHVyY2hhc2VPcmRlcjoxNDk5NDQ4 - Marked as closed
  • UHVyY2hhc2VPcmRlcjoxNTA1NTY5 - Marked as cancelled
  • UHVyY2hhc2VPcmRlcjoxNTAzNzU0 - Marked as closed

In all the aforementioned cases, we’re able to see the right status in our data warehouse but we never got a “closed” or “cancelled” update from the webhook.

All the best,
Colin

Hey @cschouten,

Thanks for hanging in there! Unfortunately my logs don’t go back that far for the last two instances, I was however able to find the Webhook Fire for UHVyY2hhc2VPcmRlcjoxNDk5NDQ4:

2023-08-23T15:29:44.776628693Z

{"test": "0", "purchase_order": {"id": 1499448, "po_number": "PO-89(Keystone)", "po_id": 89, "po_uuid": "UHVyY2hhc2VPcmRlcjoxNDk5NDQ4", "account_id": 66971, "line_items": [], "warehouse_id": 82930, "status": "closed", "webhook_type": "PO Update"}}

{"code":200,"message":"Event collected successfully"}

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

Best,
RayanP

Hi @sh-agent,

I’m afraid that’s not what we need. How far back do your internal logs go?

All the best,
Colin

Hey @cschouten,

Thanks for your patience!

Our logs go back a maximum of 60 days.

We’re also evaluating the triggers of the PO Update Webhook at the moment. I’ll keep you posted on updates here.

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

Best,
Rayanp