Webhooks Being Sent Twice: Not the typical reason

Solved
fiveone
New Member
2 1 0

We've subscribed to webhooks via the GraphQL Admin API. I can confirm with the "Shopify GraphiQL App" that we are only subscribed to the "PRODUCTS_UPDATE" webhook. We are using PHP at our endpoint. The webhooks have different webhook delivery ids in the headers so it's not that we are recording the same data twice. These are sent within the same few milliseconds. This is not a fluke - it happens every-time without fail.

What has been checked:

  1. There are no webhooks in the dashboard under "Notifications".
  2. There is only 1 api created webhook on our development store
  3. We've added header('HTTP/1.1 200 OK');
  4. We've added http_response_code(200);
  5. In "Shopify Partners" > "Webhook Delivery Metrics" it only shows one webhook in the pair (sometimes the first sometimes the second).
  6. Tested actually visiting our endpoint URL manually and it only records one visit as it should, just not when updating a product on the Shopify dashboard.

Ex Webhook IDs Sent:

  1. 882a5faa-0180-40c0-b3ad-ed17e4e6750a
  2. 8ae01c7c-10a2-4480-a903-5367e3b6a34a

 

Any help would be appreciated so much! THANKS!

Accepted Solution (1)

Accepted Solutions
fiveone
New Member
2 1 0

This is an accepted solution.

Ok, so there are many areas where webhooks can be programmed in GraphQL, NOT two (as mentioned all over the Shopify decisions forums).

  1. Admin Dashboard > Notifications
  2. Programmatically via your our code
  3. The "Shopify GraphiQL App" or another app

I had a "PRODUCTS_UPDATE" webhook in the "Shopify GraphiQL App" and another webhook set that only displayed in our code. Since the "Shopify GraphiQL App" is its own app, it must have its own set of data for webhooks. 

Also, "Webhook Metrics" were only displaying for area #2 because, again, it was using a different app with different data.

I hope this helps someone in the future!

View solution in original post

Reply 1 (1)
fiveone
New Member
2 1 0

This is an accepted solution.

Ok, so there are many areas where webhooks can be programmed in GraphQL, NOT two (as mentioned all over the Shopify decisions forums).

  1. Admin Dashboard > Notifications
  2. Programmatically via your our code
  3. The "Shopify GraphiQL App" or another app

I had a "PRODUCTS_UPDATE" webhook in the "Shopify GraphiQL App" and another webhook set that only displayed in our code. Since the "Shopify GraphiQL App" is its own app, it must have its own set of data for webhooks. 

Also, "Webhook Metrics" were only displaying for area #2 because, again, it was using a different app with different data.

I hope this helps someone in the future!

View solution in original post