PO Update (closed) webhook notification being sent more than once?

Hi,
It seems that my webhook set to receive PO Update notifications seems to be receiving multiple pings on a PO being closed. This happens every single time for me - could you pls see if this is something that is incorrectly set on my end or an SH issue?

Here’s the first and second webhook export of a test PO I closed:

[
  {
    "headers": {
      "host": "redacted",
      "x-forwarded-scheme": "https",
      "x-forwarded-proto": "https",
      "x-forwarded-for": "redacted",
      "x-real-ip": "redacted",
      "content-length": "1199",
      "cdn-loop": "cloudflare",
      "cf-ipcountry": "US",
      "accept-encoding": "gzip, br",
      "cf-ray": "898dc54219b68000-IAD",
      "cf-visitor": "{\"scheme\":\"https\"}",
      "sentry-trace": "e4f717e61767414494dd10a7940afd39-adb68c90aee8f12c-0",
      "baggage": "sentry-trace_id=e4f717e61767414494dd10a7940afd39,sentry-environment=prod,sentry-release=293c323,sentry-public_key=613bdf17979047029f3c4b2e7afe6a5d,sentry-transaction=customers_webhooks.process_webhooks",
      "user-agent": "ShipHero Request V1.0",
      "accept": "*/*",
      "content-type": "application/json",
      "x-shiphero-hmac-sha256": "xTWlAMaf9kKv+/KGIX9hShDoyQLH+byiUejccg3KGUM=",
      "cf-connecting-ip": "redacted"
    },
    "params": {},
    "query": {},
    "body": {
      "test": "0",
      "purchase_order": {
        "id": 1493614,
        "po_number": "multitest1",
        "po_id": 8,
        "po_uuid": "UHVyY2hhc2VPcmRlcjoxNDkzNjE0",
        "account_id": 69683,
        "line_items": [
          {
            "id": "23106a9b49684d04a6dc",
            "quantity": 1,
            "quantity_received": 0,
            "sku": "Test5",
            "vendor_id": null,
            "vendor_uuid": "VmVuZG9yOk5vbmU=",
            "vendor_account_number": null,
            "vendor_sku": null
          },
          {
            "id": "4ba7da7d92dbc5a7709e",
            "quantity": 1,
            "quantity_received": 0,
            "sku": "Test3",
            "vendor_id": null,
            "vendor_uuid": "VmVuZG9yOk5vbmU=",
            "vendor_account_number": null,
            "vendor_sku": null
          },
          {
            "id": "bcdfb49052f90f6f5155",
            "quantity": 1,
            "quantity_received": 0,
            "sku": "Test4",
            "vendor_id": null,
            "vendor_uuid": "VmVuZG9yOk5vbmU=",
            "vendor_account_number": null,
            "vendor_sku": null
          },
          {
            "id": "c908e2c064fb3d15989d",
            "quantity": 1,
            "quantity_received": 0,
            "sku": "Test2",
            "vendor_id": null,
            "vendor_uuid": "VmVuZG9yOk5vbmU=",
            "vendor_account_number": null,
            "vendor_sku": null
          },
          {
            "id": "fd5b40a73d516543c238",
            "quantity": 1,
            "quantity_received": 0,
            "sku": "Test1",
            "vendor_id": null,
            "vendor_uuid": "VmVuZG9yOk5vbmU=",
            "vendor_account_number": null,
            "vendor_sku": null
          }
        ],
        "warehouse_id": 74776,
        "status": "closed",
        "webhook_type": "PO Update"
      }
    },
    "webhookUrl": "http://localhost:5678/webhook/sh/po",
    "executionMode": "production"
  }
]
[
  {
    "headers": {
      "host": "redacted",
      "x-forwarded-scheme": "https",
      "x-forwarded-proto": "https",
      "x-forwarded-for": "redacted",
      "x-real-ip": "redacted",
      "content-length": "1199",
      "cdn-loop": "cloudflare",
      "cf-ipcountry": "US",
      "accept-encoding": "gzip, br",
      "cf-ray": "898dc5597b3581b5-IAD",
      "cf-visitor": "{\"scheme\":\"https\"}",
      "sentry-trace": "3e0bd6e10e384bc082d2235487a34549-bb1d5fbd3d6956b4-0",
      "baggage": "sentry-trace_id=3e0bd6e10e384bc082d2235487a34549,sentry-environment=prod,sentry-release=293c323,sentry-public_key=613bdf17979047029f3c4b2e7afe6a5d,sentry-transaction=customers_webhooks.process_webhooks",
      "user-agent": "ShipHero Request V1.0",
      "accept": "*/*",
      "content-type": "application/json",
      "x-shiphero-hmac-sha256": "xTWlAMaf9kKv+/KGIX9hShDoyQLH+byiUejccg3KGUM=",
      "cf-connecting-ip": "redacted"
    },
    "params": {},
    "query": {},
    "body": {
      "test": "0",
      "purchase_order": {
        "id": 1493614,
        "po_number": "multitest1",
        "po_id": 8,
        "po_uuid": "UHVyY2hhc2VPcmRlcjoxNDkzNjE0",
        "account_id": 69683,
        "line_items": [
          {
            "id": "23106a9b49684d04a6dc",
            "quantity": 1,
            "quantity_received": 0,
            "sku": "Test5",
            "vendor_id": null,
            "vendor_uuid": "VmVuZG9yOk5vbmU=",
            "vendor_account_number": null,
            "vendor_sku": null
          },
          {
            "id": "4ba7da7d92dbc5a7709e",
            "quantity": 1,
            "quantity_received": 0,
            "sku": "Test3",
            "vendor_id": null,
            "vendor_uuid": "VmVuZG9yOk5vbmU=",
            "vendor_account_number": null,
            "vendor_sku": null
          },
          {
            "id": "bcdfb49052f90f6f5155",
            "quantity": 1,
            "quantity_received": 0,
            "sku": "Test4",
            "vendor_id": null,
            "vendor_uuid": "VmVuZG9yOk5vbmU=",
            "vendor_account_number": null,
            "vendor_sku": null
          },
          {
            "id": "c908e2c064fb3d15989d",
            "quantity": 1,
            "quantity_received": 0,
            "sku": "Test2",
            "vendor_id": null,
            "vendor_uuid": "VmVuZG9yOk5vbmU=",
            "vendor_account_number": null,
            "vendor_sku": null
          },
          {
            "id": "fd5b40a73d516543c238",
            "quantity": 1,
            "quantity_received": 0,
            "sku": "Test1",
            "vendor_id": null,
            "vendor_uuid": "VmVuZG9yOk5vbmU=",
            "vendor_account_number": null,
            "vendor_sku": null
          }
        ],
        "warehouse_id": 74776,
        "status": "closed",
        "webhook_type": "PO Update"
      }
    },
    "webhookUrl": "http://localhost:5678/webhook/sh/po",
    "executionMode": "production"
  }
]

Hey @Raj, I’ll have to do some troubleshooting. I will get back to you as soon as I have more details.
Have a great day!

Yes sure, @tomasfd , I’ll wait for your findings.

Hello @raj!
Which steps are you taking to update the status to closed?
I still was not able to reproduce it on my end.
Have a nice day!

Hi @tomasfd, I just went to https://app.shiphero.com/dashboard/purchase-orders/details/XXXX and selected Status: Closed in the dropdown and clicked Save Changes.
But I believe the same thing happens using this page: https://purchase-orders.shiphero.com/purchase-orders/details/XXXX

If it helps, I can run the test again and send you the same exports with no redactions.
Thank you

Hi @Raj

Checking the logs, I see there are two registered webhooks for PO_UPDATE.
One to hook.us1.make.com and the other to n8n.shipbots.net and that is why you are getting the notifications doubled.

Have a nice day!

Hi @Luisperrone, Thank you for looking into this, but the exports I posted are only collected from the n8n url. That’s the only one I’ve been looking at while noticing the duplicates.
Does that information help?

Hi @Raj

Yes, it does help!

I found the logs for the duplicated notification.

I also see there was a fix about this on June 28.

Can you make a new test to see if this is solved?

Hi @Luisperrone, sorry to report this but my happiness lasted only a few seconds - then the second notification showed in the log.
Here are both exports:

[
  {
    "headers": {
      "host": "redacted",
      "x-forwarded-scheme": "https",
      "x-forwarded-proto": "https",
      "x-forwarded-for": "redacted",
      "x-real-ip": "redacted",
      "content-length": "817",
      "cdn-loop": "cloudflare",
      "cf-ipcountry": "US",
      "accept-encoding": "gzip, br",
      "cf-ray": "89d03012af8e4316-EWR",
      "cf-visitor": "{\"scheme\":\"https\"}",
      "sentry-trace": "4f928643f4ff498a936cf8d31e902a0b-9cb3898c3e28b415-0",
      "baggage": "sentry-trace_id=4f928643f4ff498a936cf8d31e902a0b,sentry-environment=prod,sentry-release=293c323,sentry-public_key=613bdf17979047029f3c4b2e7afe6a5d,sentry-transaction=customers_webhooks.process_webhooks",
      "user-agent": "ShipHero Request V1.0",
      "accept": "*/*",
      "content-type": "application/json",
      "x-shiphero-hmac-sha256": "xVCeBkaY7Qy5h+81pHKsCP5jPCZck74jyJjkfOyi2j8=",
      "cf-connecting-ip": "redacted"
    },
    "params": {},
    "query": {},
    "body": {
      "test": "0",
      "purchase_order": {
        "id": 1471109,
        "po_number": "354341",
        "po_id": 4,
        "po_uuid": "UHVyY2hhc2VPcmRlcjoxNDcxMTA5",
        "account_id": 69683,
        "line_items": [
          {
            "id": "5aaec7dcd1cca9b49eda",
            "quantity": 1,
            "quantity_received": 0,
            "sku": "UP-0012",
            "vendor_id": null,
            "vendor_uuid": "VmVuZG9yOk5vbmU=",
            "vendor_account_number": null,
            "vendor_sku": null
          },
          {
            "id": "7fe4d818a8758537a6eb",
            "quantity": 1,
            "quantity_received": 0,
            "sku": "UP-0010",
            "vendor_id": null,
            "vendor_uuid": "VmVuZG9yOk5vbmU=",
            "vendor_account_number": null,
            "vendor_sku": null
          },
          {
            "id": "eaf974803f7c945b5c13",
            "quantity": 1,
            "quantity_received": 0,
            "sku": "UP-0011",
            "vendor_id": null,
            "vendor_uuid": "VmVuZG9yOk5vbmU=",
            "vendor_account_number": null,
            "vendor_sku": null
          }
        ],
        "warehouse_id": 74776,
        "status": "closed",
        "webhook_type": "PO Update"
      }
    },
    "webhookUrl": "redacted",
    "executionMode": "production"
  }
]

and

[
  {
    "headers": {
      "host": "redacted",
      "x-forwarded-scheme": "https",
      "x-forwarded-proto": "https",
      "x-forwarded-for": "redacted",
      "x-real-ip": "redacted",
      "content-length": "817",
      "cdn-loop": "cloudflare",
      "cf-ipcountry": "US",
      "accept-encoding": "gzip, br",
      "cf-ray": "89d03065689b43f4-EWR",
      "cf-visitor": "{\"scheme\":\"https\"}",
      "sentry-trace": "423c0c68795e4a198e1e3a08538fb10b-904333ca42a51f7a-0",
      "baggage": "sentry-trace_id=423c0c68795e4a198e1e3a08538fb10b,sentry-environment=prod,sentry-release=293c323,sentry-public_key=613bdf17979047029f3c4b2e7afe6a5d,sentry-transaction=customers_webhooks.process_webhooks",
      "user-agent": "ShipHero Request V1.0",
      "accept": "*/*",
      "content-type": "application/json",
      "x-shiphero-hmac-sha256": "xVCeBkaY7Qy5h+81pHKsCP5jPCZck74jyJjkfOyi2j8=",
      "cf-connecting-ip": "redacted"
    },
    "params": {},
    "query": {},
    "body": {
      "test": "0",
      "purchase_order": {
        "id": 1471109,
        "po_number": "354341",
        "po_id": 4,
        "po_uuid": "UHVyY2hhc2VPcmRlcjoxNDcxMTA5",
        "account_id": 69683,
        "line_items": [
          {
            "id": "5aaec7dcd1cca9b49eda",
            "quantity": 1,
            "quantity_received": 0,
            "sku": "UP-0012",
            "vendor_id": null,
            "vendor_uuid": "VmVuZG9yOk5vbmU=",
            "vendor_account_number": null,
            "vendor_sku": null
          },
          {
            "id": "7fe4d818a8758537a6eb",
            "quantity": 1,
            "quantity_received": 0,
            "sku": "UP-0010",
            "vendor_id": null,
            "vendor_uuid": "VmVuZG9yOk5vbmU=",
            "vendor_account_number": null,
            "vendor_sku": null
          },
          {
            "id": "eaf974803f7c945b5c13",
            "quantity": 1,
            "quantity_received": 0,
            "sku": "UP-0011",
            "vendor_id": null,
            "vendor_uuid": "VmVuZG9yOk5vbmU=",
            "vendor_account_number": null,
            "vendor_sku": null
          }
        ],
        "warehouse_id": 74776,
        "status": "closed",
        "webhook_type": "PO Update"
      }
    },
    "webhookUrl": "redacted",
    "executionMode": "production"
  }
]

Hi @Raj

I’ve escalated this to our engineering department. I’ll keep you updated.

Have a nice day!

1 Like

Hi @Raj

The engineering team made a fix for this.
Can you confirm that it is working as expected?

Have a nice day!

1 Like

Hey @Luisperrone, YES!
Confirmed, it’s fixed - Thank you so much!

1 Like