Bidirectional Integration Causing Webhook Update Cycle

Discussions relating to Jiwa 8 plugin development, and the Jiwa 8 API.

Bidirectional Integration Causing Webhook Update Cycle

Postby edithbeatrice » Mon Jul 13, 2026 6:37 pm

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!
edithbeatrice
I'm new here
I'm new here
 
Posts: 4
Joined: Fri Jul 10, 2026 6:12 pm

Re: Bidirectional Integration Causing Webhook Update Cycle

Postby Mike.Sheen » Mon Jul 13, 2026 6:45 pm

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.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2612
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 818

Re: Bidirectional Integration Causing Webhook Update Cycle

Postby edithbeatrice » Mon Jul 13, 2026 6:53 pm

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!
edithbeatrice
I'm new here
I'm new here
 
Posts: 4
Joined: Fri Jul 10, 2026 6:12 pm

Re: Bidirectional Integration Causing Webhook Update Cycle

Postby Mike.Sheen » Mon Jul 13, 2026 6:59 pm

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.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2612
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 818


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 0 guests