Article overview
- An integration should not move a shipment backwards merely because an older webhook arrived later.
- Out-of-order delivery, repeated events and uncertain processing results require different controls.
- Check what the source promises about ordering, retries and event identifiers. For example, Stripe's webhook documentation explains considerations for event delivery and handling.
- Write the actual source's contract into the integration brief. Record which event fields describe the business object and which describe the delivery attempt.
Putting this workflow into practice? Explore Automation Systems Architecture for implementation scope, controls, and next steps.
An integration should not move a shipment backwards merely because an older webhook arrived later. Keep the event's identity and meaning separate from its delivery time, then decide how the destination verifies and applies the intended business state.
Out-of-order delivery, repeated events and uncertain processing results require different controls. A queue that handles only the ordinary sequence can look reliable in a demonstration while producing confusing records during a real delay or retry.
Read the provider's delivery contract
Check what the source promises about ordering, retries and event identifiers. For example, Stripe's webhook documentation explains considerations for event delivery and handling. That is a product-specific reference, not evidence that every shipment provider behaves identically.
Write the actual source's contract into the integration brief. Record which event fields describe the business object and which describe the delivery attempt. Preserve the original payload or permitted evidence required to investigate a disagreement.
Define the state model before comparing timestamps
List the events that can legitimately change the destination state. A later delivery time does not necessarily mean a later business event. Conversely, a correction can intentionally revise an earlier fact, so a simple rule that discards every older timestamp can also be wrong.
Where the provider supplies a reliable version or sequence for an object, use its documented meaning. Otherwise define an authoritative lookup or reviewed conflict path. Do not invent an ordering guarantee by sorting unrelated timestamp fields.
Worked example of a delayed status
Illustrative scenario: a carrier's delivered update is processed before a delayed in-transit event reaches the connector. The second event is new to the queue but describes an earlier stage of the same shipment.
| Incoming information | Required investigation | Proposed result |
|---|---|---|
| Previously processed event ID | Check recorded outcome | Return the existing confirmation |
| Older operational stage | Compare source authority and object state | Retain delivered unless a valid correction applies |
| Conflicting correction | Retrieve evidence and apply correction policy | Update with a reason or hold for review |
Test the three cases independently. A duplicate detector alone does not resolve ordering, and an ordering rule alone does not prevent a repeated financial or customer notification action.
Record processing outcomes durably
Keep the source event reference, affected object, attempted action and confirmed result. If the worker stops after changing the destination but before saving its own confirmation, recovery must inspect the existing outcome rather than blindly repeating the side effect.
The idempotency guide covers repeated business actions. Use a suitable business identity as well as the provider's delivery identity when several events can request the same downstream change.
Keep reconciliation alongside event handling
A fast event path does not prove all records are complete. Compare relevant source and destination objects on an agreed schedule and expose missing or conflicting states. The webhooks and polling guide explains why recovery and reconciliation still matter.
Make the operator queue explainable. Show what arrived, what was already known and why the integration held or ignored a proposed change. An unexplained technical error label forces the team to recreate the investigation each time.
Test recovery before launch
Deliver the same event twice, reverse two events, interrupt processing after the destination action and introduce an authorised correction. Agree the expected visible result before running the tests. Include customer notifications in the checks so a replay does not send an outdated shipping message.
Explore automation systems, or describe the source, destination and conflicting events to scope the processing contract. The handover should explain both the automatic rules and which cases need a person.
Frequently asked questions
Can we solve webhook ordering by sorting on arrival time?
No. Arrival time describes transport into the connector, not necessarily the sequence of business events. Use the provider's documented object version or another agreed authority, with a correction path for genuine changes.
Does an event queue remove the need for reconciliation?
No. A queue helps manage delivery and processing, but it does not establish that every relevant business object reached a correct destination state. Keep a reconciliation process for missing, uncertain and conflicting outcomes.
Automation Systems Architecture
For teams where leads, orders, operations, or reporting still depend on memory, WhatsApp nudges, and manual sheet updates.