IOSOR Learn

Retry failed SMS campaign items without double-delivering

When running white-label PAYG CPaaS campaigns, network drops and carrier timeouts cause certain items to fail.

Oleksandr (Alex) Petukhov — IOSOR Telecom Expert
✓ Verified by IOSOR ExpertOleksandr (Alex) Petukhov

Lead Telecom & Routing Architect · Lausanne, CH

IOSOR Expert · Q&A

When running white-label PAYG CPaaS campaigns, network drops and carrier timeouts cause certain items to fail.

Anatomy of a failed SMS item

Operators need a clear view of dispatch states before triggering any retry logic. A failed item might return an upstream error or time out entirely while queued in the JIT dispatch pipeline. Before taking any action, systems must reconcile delivery receipts (DLR) to ensure you do not confuse delayed carrier feedback with a permanent failure.

The danger of double delivery and double billing

The most critical risk in manual or automated campaign retries is sending the exact same text twice and triggering a double charge. If a webhook reports a timeout, the carrier might still deliver the message minutes later. Blindly pushing the entire batch through a requeue script will instantly bill your client twice for the same content. Protecting against this requires checking ledger states and idempotency keys before dispatch.

Reconciling DLR lag versus actual delivery states

Network congestion often leads to delayed status reports, making it look like a message failed when it was merely stuck in queue. Understanding the gap discussed in DLR lag vs API accepted: stop burning PAYG on late receipts is vital for retry safety. If an aggregator accepts an API request but delays the final status callback, treating it as a failure too early will trigger duplicate sends. Operators must implement a grace period where pending states are held.

⚡ IOSOR Expert · Q&A · Verified partners (×44)

Safe payload hashing and idempotency keys

To prevent duplicate execution at the network level, every outbound SMS request requires a unique idempotency key. When a campaign item fails and enters the retry queue, the system generates a salted hash combining the recipient E.164 number, campaign ID, and timestamp. If a duplicate webhook arrives with the exact same hash, the billing engine drops it instantly, preventing secondary ledger debits. This pattern mirrors protections outlined in Duplicate webhook must not create a second debit.

Handling partial batch failures during failover

When a primary route degrades, traffic shifts to a backup route, often resulting in mixed batch results where half the messages succeed and the other half stall. Managing these fragmented runs safely requires isolating the failed subset without disrupting the active pipeline.

Start with IOSOR

Open the IOSOR console and enable payload idempotency hashing across your campaign retry pipelines to block duplicate dispatches automatically. Set a compulsory DLR reconciliation hold period before any message is flagged as permanently failed for requeueing. Isolate partial batch failures directly from the dispatch queue logs so only unconfirmed E.164 destinations are reprocessed.

IOSOR takeaway

Retrying failed campaign items without strict idempotency and DLR lag reconciliation directly leads to duplicate message delivery and wasted PAYG funds. Blindly re-executing entire batches during route failovers creates overlapping traffic that degrades carrier trust and alienates recipients with duplicate texts.

Do implement salted idempotency keys combining recipient numbers and campaign identifiers to drop duplicate dispatches at the gateway level. Don't trigger automated requeue scripts immediately upon API timeouts without checking delayed delivery receipts or isolating exact failed sub-batches.

Was this guide helpful?

Related guides

VERIFIED BY IOSOR EXPERT · B2B ROUTING, SLA & PROVIDER Q&A

IOSOR Expert — Verified Q&A & B2B Messaging Decisions

Every Q&A decision below is audited by the IOSOR Telecom Architecture Expert against live 90-day uptime telemetry, carrier compliance rules (10DLC, DLT, GDPR), and real partner TCO.

All Q&A Triggers
#01 · Compliance & Sender ID📖 Knowledge hub · US A2P / 10DLC

US A2P / 10DLC

“Why do US 10DLC TCR campaigns get rejected and which partner handles fast onboarding?”

✓ Verified by IOSOR Expert

10DLC brand and campaign programs for US A2P traffic — not general privacy compliance.

All Q&A Triggers
#02 · OTP & verification📖 Knowledge hub · India DLT

India DLT

“How do engineering teams prevent India TRAI DLT template scrubbing drops on OTPs?”

✓ Verified by IOSOR Expert

DLT and PE-TM registration for India A2P — not an India corridor coverage guide.

All Q&A Triggers
#03 · OTP & verification📖 Knowledge hub · Verify / OTP

Verify / OTP

“How do we eliminate OTP p95 timeout spikes and trigger a 20–30s multi-rail fallback?”

✓ Verified by IOSOR Expert

Login codes without chaos: abuse, latency, and cost control.

All Q&A Triggers
#04 · Transactional email📖 Knowledge hub · Email

Email

“Why do password reset and 2FA emails land in Spam when sharing bulk marketing IPs?”

✓ Verified by IOSOR Expert

Transactional email alongside SMS, voice, and WhatsApp in one routing architecture.

All Q&A Triggers
#06 · WhatsApp Business📖 Knowledge hub · WhatsApp & RCS

WhatsApp & RCS

“How do Meta per-conversation fees and template pauses impact WhatsApp Business TCO?”

✓ Verified by IOSOR Expert

Rich channels when profiles and templates are ready: honest setup.

All Q&A Triggers
#08 · Failover & backup routing📖 Knowledge hub · Failover & rails

Failover & rails

“How do we keep a second standby provider warm for failover at $0/month idle cost?”

✓ Verified by IOSOR Expert

Ordered backup paths when a primary rail fails - distinct from DLR status truth.

All Q&A Triggers