Mike.Sheen wrote:It may be by design - depending on how the stock take is adjusting the stock level - for example, if the stock take is reducing the stock level of an item it may fire the webhook event for each line detail - not just the item itself.
This is exactly what it is. The StockLevelChanged webhook is invoked whenever the WarehouseSOHUpdateEvent is raised by the JiwaApplication.Manager. The stock take will cause that event to be raised for each line detail when saving a stock take that is being activated.
If you are not familiar with Jiwa's Line Detail concept - to give you a brief explanation it means stock levels are comprised of multiple line details which represent a discrete inwards movement of the stock. If you have 10 left of an item in stock in a warehouse, there may be anywhere between 1 and 10 line details representing that quantity - each with potentially different costs, bin locations, expiry dates and serial numbers.
If you need to only have one stock level changed event, then you will need to create an intermediate receiver for the webhook which aggregates and then transmits a single webhook.