IOSOR Learn

Queued vs Sent: One Message Path in IOSOR

Understand how finance and product share a unified state machine for SMS and OTP lifecycle stages, balancing prepaid holds and DLR status in IOSOR.

Queued vs Sent: One Message Path in IOSOR.

The Single State Machine for Queued and Sent

When an API request hits the platform to transmit an SMS or OTP payload to an E.164 destination, product and finance teams must reference the exact same lifecycle state. In legacy white-label setups, product treats 'queued' as an engineering status while finance waits for end-of-month statements. IOSOR eliminates this disconnect by operating a single deterministic state machine. When an HTTP payload is validated, the message enters the queued state immediately. This state creates an explicit entry in the transaction log, locking the route rate and applying an authorization hold against the client prepaid wallet.

Financial Reserve on Queue versus Final Settlement

Upon entering the queued state, the engine executes an immediate balance check. To maintain platform solvency, accounts must uphold the USD 20 prepaid floor before outbound traffic enters the pipeline. When queued, the projected cost of the outbound SMS segment is held. If the message transitions from queued to sent, this hold converts to a final balance debit. If the message fails validation, the hold is released immediately. As monthly traffic grows toward the soft review near USD 1,000/month, ledger concurrency prevents balance drift during high-throughput state transitions.

Transition Triggers: API Ingestion to Handoff

The boundary between queued and sent is strict. Queued means the payload is validated, rate-calculated, and assigned to the dispatch queue with reserved funds. Sent indicates that the edge gateway transmitted the PDU to the network interface and received an intermediate acknowledgment. At this millisecond, the system updates the state from queued to sent and dispatches an asynchronous webhook event. Numbers are provisioned using JIT allocation, ensuring E.164 routing and MRC accounting occur without speculative reservations.

Reconciling Ledger Audits with Delivery Reports

Finance audits often clash with engineering logs when DLR delays occur. In IOSOR, sent is the accounting point of final debit commit. DLR statuses like DELIVERED or UNDELIVERED update operational metrics without altering the initial transaction ledger. If an inbound STOP command is received, subsequent attempts for that E.164 address are rejected at the API boundary with Verify OK status before financial holds occur.

Operational Playbook and Related Architecture

To maintain alignment across engineering and financial ops, follow these core reference guides for queue handling, webhook idempotency, and wallet mechanics:

Start with IOSOR

Open the IOSOR console and navigate to the Lifecycle State Machine configuration to align your outbound hooks with the single queue-to-sent pipeline. Configure your ledger integration to recognize the sent state as the authoritative point for final debit commit rather than waiting on downstream carrier DLRs. Validate the setup by running a test dispatch and auditing the unified transaction state ID across engineering webhooks and financial logs.

IOSOR takeaway

This guide proved that unifying product telemetry and billing around a single state machine removes operational friction between engineering and finance. Reserving funds upon queue entry and committing final debits when the gateway emits the sent event creates a deterministic accounting model that remains unaffected by delayed or missing delivery receipts.

Do map accounting settlement triggers exclusively to the sent transition while using DLRs strictly for operational quality metrics. Don't tie ledger adjustments or debit commits to asynchronous delivery receipts, which introduces accounting drift and audit reconciliation conflicts.

Was this guide helpful?

Related guides