Two-way integrations can bounce the same change between systems indefinitely. Prevent loops with explicit field ownership, origin tracking, and no-op detection rather than hoping event filters happen to stop the cycle.
Integration loops are repeated business propagation
A webhook loop occurs when system A changes B, B emits an event that changes A, and the cycle continues. Repeated notifications, costs, audit noise, and conflicting records can follow even when every individual request succeeds.
For a proposed design, define which system owns each field and which updates are allowed in each direction. Carry supported origin or correlation metadata where available. Compare meaningful current values before writing, using documented normalisation rules.
Do not rely only on a timestamp saying the update happened recently. A legitimate new change can occur quickly, and delayed echoes can arrive much later. The control should reflect operation identity and domain meaning.
Reproduce a fictional phone-format loop
System A stores a callback number in one format. Its event updates B, which normalises the value differently and emits another update. A then restores its preferred formatting. Neither system believes it is making a no-op, so the loop continues.
Choose a canonical comparison representation and keep display formatting separate from the underlying value. If one system is authoritative for that field, the reverse direction should not overwrite it without the defined conflict process.
| Loop fixture | Expected stop condition |
|---|---|
| Exact echoed operation | Recognised and not propagated again |
| Equivalent formatted value | No unnecessary write |
| Legitimate new customer change | Allowed according to ownership policy |
| Delayed echo | Still does not reopen the cycle |
| Missing origin metadata | Safe fallback and visible uncertainty |
Record propagation depth and operation relationships in the test harness. A loop limit can contain damage, but reaching the cap should create a diagnosable failure rather than silently discard important updates.
Separate loop prevention from deduplication
Duplicate delivery concerns the same event arriving again. A loop may create genuinely new event identifiers on every hop, so event-ID deduplication alone cannot solve it. Business-level change comparison and authority rules are necessary.
Field ownership can limit flexibility when both systems permit edits. Define conflict handling explicitly and consider a manual review path for ambiguous simultaneous changes. Bidirectional synchronisation is a product decision with ongoing maintenance cost.
This design is proposed. The voice platform case study describes relevant integration experience. Pair it with cross-provider deduplication.
Webhook loop FAQ
Is deduplicating event IDs sufficient?
No. Each loop hop may produce a new legitimate event identifier.
Should every reverse-direction event be blocked?
Only if the intended field-ownership policy makes that direction invalid. Legitimate changes need a supported path.
What should a loop guard report?
The affected field, origin chain, compared values under safe handling, and the owner responsible for resolving the conflict.