Covers all questions related to inventory management, order fulfillment, and shipping.
We are an app / fulfillment service and recently started using Eventbridge. However, it is not possible as mentioned in THIS thread to change the callback_url to an Eventbridge ARN. That being the case, we added another webhook for managing fulfillment requests by adding our ARN to the "fulfillment_orders/fulfillment_request_submitted" webhook.
This generally works, but now we have two requests that are sent to us whenever a new fulfillment request occurs. What is the best practice here? It seems bizarre that Shopify doesn't allow the callback_url to be a Eventbridge url even though Shopify seemingly recommends Eventbridge for this? We have been just auto responding with a 200 to our callback_url events and then processing everything through Eventbridge. I would love to hear more about this and the best practices that the Shopify team recommends.
Thanks!
Hi Jjrise
An alternative method to handle this might involve using a Lambda function on AWS to receive the webhook and then pass the data to EventBridge. This way, you will only have one request coming into your system for each event.
For the redundant webhooks that are being sent to your callback_url, you might want to look into unsubscribing from those specific webhooks if they're not needed. You can do this through the Shopify admin API.
Hope this helps!
Liam | Developer Advocate @ 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
Hi @Liam, thanks for the quick response! We might be on slightly different pages though... These are the two events that I am referring to below.
So now every time a new order comes in, we receive events for both #1 and #2. Right now I respond to #1 immediately with a 200 and the process #2 normally via Eventbridge.
Thanks!