Join us for an upcoming Shopify Partner webinar on February 27, 2024. Discover the latest Checkout Extensibility features, and deep dive on improvements to Shopify Functions and Web Pixels. Register now for either the 10am EST or 2pm EST sessions.
Solved

Webhook being removed with no notification

OliverPatron
Shopify Partner
2 0 0

I'm currently having a 'product update' webhook being removed without any notification. This was setup under 'Settings' > 'Notifications' in Shopify store admin.

 

It's hard to pinpoint why this is happening but I believe it to be a function timeout passing back a 504 error. The problem is that I can't see this being called multiple times over the period Shopify tries before it removes a webhook.

 

Is there any way to find out why I am not receiving notifications and confirmation of why the webhook was removed? It would be good to use an alternate email to the store owner to get these alerts if possible.

 

Kind regards,

 

Oliver.

Accepted Solution (1)

awwdam
Shopify Staff
249 42 36

This is an accepted solution.

Hey @OliverPatron

With most Shopify webhooks, it is expected behavior that multiple 504 timeout errors eventually end in a webhook being removed. This is generally due to a delayed response of 200 OK,  and suggest an app configuration that prioritize this response before processing the payload data. 

There is a best practices guide with additional context on handling webhooks, and I often use webhook.site for testing and troubleshooting. If you are a Shopify Partner, using the API to create and manage your webhooks may be another consideration, and gives access to the webhook delivery metrics tool in the Partner Dashboard.

Finally, if you are concerned about an unexpected functionality involving webhooks created through a shop's admin and have already worked through this resource,  and can confirm a reply is being sent, you may want to connect with Shopify Support directly to take a closer look. 

Hope that helps - cheers!


awwdam | API Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Replies 2 (2)

awwdam
Shopify Staff
249 42 36

This is an accepted solution.

Hey @OliverPatron

With most Shopify webhooks, it is expected behavior that multiple 504 timeout errors eventually end in a webhook being removed. This is generally due to a delayed response of 200 OK,  and suggest an app configuration that prioritize this response before processing the payload data. 

There is a best practices guide with additional context on handling webhooks, and I often use webhook.site for testing and troubleshooting. If you are a Shopify Partner, using the API to create and manage your webhooks may be another consideration, and gives access to the webhook delivery metrics tool in the Partner Dashboard.

Finally, if you are concerned about an unexpected functionality involving webhooks created through a shop's admin and have already worked through this resource,  and can confirm a reply is being sent, you may want to connect with Shopify Support directly to take a closer look. 

Hope that helps - cheers!


awwdam | API Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

OliverPatron
Shopify Partner
2 0 0

Hi Awwdam,

 

Thanks for explaining this and providing some helpful links. I will look to change how I respond to the Shopify webhook and handle my serverless function separately in a queue.

 

Kind regards,

 

Oliver.