IOSOR Learn
DLR Event Dedup Window: Reconciling Duplicate Receipts Before Billing
Size a DLR dedup window that stops duplicate and near-simultaneous receipts from inflating delivery counts, then reconcile carrier events against your ledger before Billing.
Lead Telecom & Routing Architect · Lausanne, CH
Set the dedup window from observed retry and replay gaps, not a round number: key on message ID plus carrier state, collapse repeats inside a measured horizon, and reconcile what remains against your ledger before any Billing run.
Define duplicate versus near-simultaneous DLR receipt
Separate two cases before choosing a window. Duplicate means the same terminal state for the same message ID arriving twice, usually after a partner retry or a replay from your own queue. Near-simultaneous means two different events land within seconds: a delivered receipt and a later failed or expired one, or a submit acknowledgement bleeding into a final state.
Measure replay and retry gaps before sizing the window
A window pulled from habit breaks on the first bad night. Pull 14 days of raw DLR events and plot two distributions: gaps between identical terminal states for one message ID, and gaps between conflicting states. The dedup window sits above the 99th percentile of same-state gaps and below the median of your Billing cycle, so late replays still collapse but a genuine second attempt is never swallowed.
Reconcile carrier receipts against your ledger
Dedup produces a clean count, reconciliation proves it. For each Billing period, join carrier final states to ledger rows on message ID and check: every sent message has exactly one terminal state, no message carries a delivered and a failed state after dedup, and no receipt exists without a ledger row. Classify mismatches as duplicate-collapsed, out-of-order-resolved, orphan receipt, or missing receipt.
Gate Billing runs on a reconciled count
Make the reconciliation result the only input Billing accepts. The gate passes when the pre-dedup to post-dedup delta is inside the measured band, every mismatch class has an owner and a disposition, and the orphan and missing counts are zero or signed off. Log the window setting, the event snapshot ID, and the delta with each run so a later dispute can replay the exact state.
Verify dedup logic against partner DLR semantics
Partner DLR semantics differ: retry policy, terminal state naming, timestamp precision, and whether the same message ID is reused across attempts. Before locking a window, compare candidate partner routes on four criteria for your channel and corridor: DLR retry behavior and expected duplicates, idempotency guarantee on webhook delivery, timestamp granularity for ordering, and documented terminal-state set.
Start with IOSOR
Compare verified partner routes for your channel and corridor before you lock the window. Open the Decision Brief partner comparison and capture retry behavior, idempotency, timestamp precision, and terminal-state coverage per route, then confirm the field list and semantics in /tools.
Related: PAYG hold before first debit · Wallet stop-lines before production.
IOSOR takeaway
Separate two cases before choosing a window. Before locking a window, compare candidate partner routes on four criteria for your channel and corridor: DLR retry behavior and expected duplicates, idempotency guarantee on webhook delivery, timestamp granularity for ordering, and documented terminal-state set (/tools/brief · DLR / webhook).
Was this guide helpful?
Related guides
- Webhook Fanout Failure Isolation: Auditing Partial Delivery Blast Radius
Isolate DLR webhook fanout blast radius per endpoint, verify partial delivery scope, and compare partner routes before a single degraded consumer becomes systemic.
- Telemetry Sampling Bias in Delivery Rate Estimation
How sampled DLR and webhook telemetry skews delivery-rate estimates, and how to validate sampling assumptions across partner routes before trusting dashboards or SLA credits.
- Telemetry Gap Attribution During Provider Maintenance Windows
Separate planned telemetry silence from real SMS delivery failures during provider maintenance, then decide whether to reroute or hold using DLR and webhook evidence.












