Case is that, there is store with multiple locations, and unfulfilled order. Merchant goes to the order panel and change fulfilment location (without fulfilling order). orders/updated web hook is called but without any new data, information about selected fulfilment location is not there. So two questions comes to my mind
1) How i can get what location has been selected ?
2) It is not only case when web hooks is called without any change visible in the payload, do you have a plan to fix this anyhow?
Hello, @greg12, to answer your questions:
1) Have you looked at what other Webhook topics exist? In particular, you might be interested in 'fulfillments/create' and 'fulfillments/update', which seem to have the location information you're looking for.
2) It is a known issue that sometimes webhooks are triggered without any changes in the payload. We have some safety around de-duplicating consecutive webhooks with the same payload, but in general can't guarantee that they will always carry new information. I'm adding this post to a collection of feedback about this, and we'll work to formulate a strategy from there.
I just tried the fulfillments/create and fulfillments/update and another issue, subscription to this webhook cant be create. It throws 422 Unprocessable entity. Yes i specified topic and format. If in same call i change topic to anything else it properly creates webhook but for fulfillments it is 422.
EDIT : Im now able to create mentioned above webhooks. I had to add read_fulfillments permission.
1) This seems to be against logic. Having read_orders access scope, which is enough to subscribe to orders/fulfilled, is not enough to subscribe to fulfillments/create ( update )
1a) Another issue is your naming convention, look at topics, some of them are in past form orders/fulfilled, some not orders/create (without d)
2) Next issue is that, to have fulfillments/create webhook called you need to mark order as fulfilled. But inventory is reduced on order creation without waiting for fulfillment. Moreover, one can change fulfillment location before marking order as fulfilled. This causes orders/updated (with d) webhook called, but not fulfillments/update ( here without d ). And orders/updated is called without any change in the payload. So, let me ask one more time. Is there any way to be notified, that merchant changed fulfillment location of order that is not fulfilled yet.
Echoing the last poster, why are fulfillments separate scopes and not included under orders? This creates headaches for many app owners when we begin to add functionality to support more robust inventory management and multiple locations, only finding out the initial scope we requested isn't sufficient and forcing merchants to re-authorize our app.