Page 1 of 1

Bidirectional Integration Causing Webhook Update Cycle

PostPosted: Mon Jul 13, 2026 6:37 pm
by edithbeatrice
Hi everyone,

I'm implementing a bidirectional integration between Jiwa and another inventory system. I have enabled the `inventory.create` and `inventory.updated` webhooks.

The issue I'm facing is that when an inventory item is updated in the external system, my integration pushes the update to Jiwa. Jiwa then triggers the `inventory.updated` webhook, which my integration receives and sends back to the external system, creating an infinite update loop.

At the moment, I'm handling this by maintaining a concurrent dictionary in my integration to temporarily track updates that originated from my system and ignore the corresponding webhook events. While this works, it feels more like a workaround than a proper solution.

I'm wondering if there's a better approach supported by Jiwa. For example, when making API requests to update inventory, can I send a custom HTTP header (or another identifier) that Jiwa can inspect and use to suppress webhook generation, or include that information in the webhook so I can identify that the change originated from my integration?

If not, how are others implementing bidirectional integrations without causing webhook loops? Are there any recommended best practices for handling this scenario?

Thanks!

Re: Bidirectional Integration Causing Webhook Update Cycle

PostPosted: Mon Jul 13, 2026 6:45 pm
by Mike.Sheen
edithbeatrice wrote:can I send a custom HTTP header (or another identifier) that Jiwa can inspect and use to suppress webhook generation, or include that information in the webhook so I can identify that the change originated from my integration?


Yes, you can introduce your own request header, and a plugin can alter the behaviour in Jiwa to short-circuit the generation of webhooks if that header is present.

This is vaguely familiar, so I may have done this before.

Re: Bidirectional Integration Causing Webhook Update Cycle

PostPosted: Mon Jul 13, 2026 6:53 pm
by edithbeatrice
Hi Mike,

Could you please share a sample or part of your implementation/code for this approach?

It would be really helpful to understand how you are handling the custom request header in the plugin and how you are short-circuiting the webhook generation when the header is present.

Thanks!

Re: Bidirectional Integration Causing Webhook Update Cycle

PostPosted: Mon Jul 13, 2026 6:59 pm
by Mike.Sheen
edithbeatrice wrote:Could you please share a sample or part of your implementation/code for this approach?

It would be really helpful to understand how you are handling the custom request header in the plugin and how you are short-circuiting the webhook generation when the header is present.


Have a look at the Selective Webhook Filter plugin. You might need to import it from the /Plugins subfolder of the Jiwa installation folder.