Update webhook for different shipments in the same order

Hello ShipHero,

Currently, we want to send our customer the custom_tracking_url from your update webhook. In most of our orders, we have many items in it and they might be sent by different shipment which means different custom_tracking_url. Would the webhook feature send multiple request for different shipments when you get a new custom_tracking_url? Or how would your webhook handle for this kind of situation? Thanks!

Sincerely,
Vege

Hi @vegeman!
That is correct, there should be one Shipment Update webhook per shipment. This means if two different Shipments have two different Tracking URLs you should receive two Webhooks (one per shipment) with their corresponding Tracking URLs.

Let us know if that doesn’t help.
Thanks in advance!
Tom

Hello @tomasw,

Thank you! This is very helpful!

Hello ShipHero,

Another follow up question, would the payload of the webhook tells us the particular goods of this shipment? Like, we have A, B, C, D in an order and the first shipment only carry A and B. Could we know that detail of the webhook?

Hello @vegeman !
Yes, it will, exactly as you said, in each shipment, you will only see the items from that order shipped in it.
In this link, you can check the full payload of the webhook:
https://developer.shiphero.com/webhooks#shipment-update-webhook
Line items will have inside one entry for each line item shipped in that shipment with all its fields. You should expect something like this: "line_items": [{line item 1 fields},{line item 2 fields},{line item 3 fields}].
Please let us know if that helped.
Have a nice day!
Tomas

1 Like

Hello Tomas,

This is very helpful and I have implemented and tested it. Thank you so much!

Sincerely,
Vege

1 Like

Hello @tomasfd,

I encountered an issue for some orders. I saw the system add extra string into items sku:

[
{
id: '87-0378-CANE-SWE-046-A-US2-327-224044639-1',
shiphero_id: 596572657,
quantity: 2,
sku: '87-0378-CANE-SWE-046-A-US2 7/9/2022',
serial_numbers: [],
customs_description: '',
package: 'Package #1',
lot_id: null,
lot_name: null,
lot_expiration: null
},
...

This is kind of weird. I wonder could we keep our sku static(“87-0378-CANE-SWE-046-A-US2” only)?

Sincerely,
Vege

Hello @vegeman!
I assume you are still talking about the shipments webhook. Is this correct?
I will look into it.
Have a great day!
Tomas

Hello @tomasfd,

Yes, I’m talking about shipment webhook and I double check with my colleague that appended date string was made by them.
Besides that, we have another related issue about webhook topic. We are using your update webhook to trigger our notification email to our customer but sometimes we received the same request twice in the same time and it is the same tracking url. Why does it happen and could we adjust it? Thanks!

Sincerely,
Vege

Hello @vegeman!
I hope you are doing well.
Yes, you are right. I just saw those other SKUs with the appended dates. Was it an attempt to track lots/expiration dates?
I will run some tests on my end to see if the same thing happens to me. Could you share with me and order with which this has happened? You can send it by private message if you want.
Best,
Tomas

Hello Tomas,

You can see the latest order 378 & 379. I also looked up the request log of order 379:
2021-11-17 14:56 +00:00 HTTP/1.1 200 34 - 0.483 ms
2021-11-17 14:57 +00:00 HTTP/1.1 200 34 - 0.494 ms

As we can see, our server responds to your status 200 instantly but gets another same request within 30s…

Sincerely,
Vege

Tomas Ferrin Depaoli via ShipHero Community <shiphero@discoursemail.com> 於 2021年11月18日 週四 上午3:50寫道:

Hello @Vegeman!
I can see what you’re explaining. It seems we are sending two shipment update notifications per request, not because we are not receiving your 200s. I think they are being enqueued at the exact second, so the second one goes through anyway, no matter your answer.
These orders, are you creating them with the API or manually? Or is it both?
Bets regards,
Tomas