Hello sir,
I am working with the webhook integration for inventory and found the webhook is triggered 2 times for every change. Is there any way to get only one hit for every change?
Hello sir,
I am working with the webhook integration for inventory and found the webhook is triggered 2 times for every change. Is there any way to get only one hit for every change?
Are you listening for both create and update? When are you seeing two hooks trigger (are you adding inventory? Updating inventory? How?).
For create, update, and delete. If any changes happen in inventory, 2 hooks are triggering with the same request.
I am sorry, I can't reproduce this issue. I just set up an inventory webhook in sandbox:
1) When you create an inventory item you will get two webhook messages one will be a create, the other will be an update.
2) When you update an inventory item you will get a single update event.
3) When you delete an inventory item you will get a single delete event.
I am seeing the same issue. For inventory events, the webhook is being triggered twice. The way I have been reproducing is that I go in the inventory app on Clover device and change the quantity of an item. That change triggers the webhook being called twice for the same item.
Can you please help. This is essentially doubling the webhook processing load on our system.
I am also getting two Update events when updating Items. For example, when I change the Price of an Item and click "Save" in my Sandbox account using the website, the below set of events are fired for that App and Merchant:
[{'objectId': 'I:264EBT1ZK9H0E', 'type': 'UPDATE', 'ts': 1614785742570}, {'objectId': 'I:264EBT1ZK9H0E', 'type': 'UPDATE', 'ts': 1614785742687}]
Are we expected to handle these things by discarding all but the last Update? From the previous response it sounds like no, as this should not be happening. Is this a bug?
Regarding Create actions, why are both a Create and Update event sent? This makes it difficult to consume/interpret what is happening because the Update basically needs to be discarded before processing or the same Entity will be processed twice, once for Create and once for Update.
Appreciate any help on these issues.
I have reproduced the behavior you are describing and in both cases it seems like an issue on our end. I will open up a few tickets so we can investigate this.
3 People are following this question.