Start the conversation

Every reply handled in seconds. Any time of day.

Inbound messages are validated, queued, and processed asynchronously. Compliance runs before the AI sees anything. The pipeline returns a response in seconds — no human in the loop required.

200 OKwebhook returns immediately — pipeline runs asynchronously
< 5 secondstypical end-to-end response time from inbound to outbound
24/7no business hours required for inbound response
0 duplicatesMessageSid idempotency checked at webhook and pipeline
How inbound handling works

Receive, validate, queue, respond — all before a human could read the message.

When Twilio delivers an inbound webhook, the platform validates the request, writes the raw payload to the message queue, enqueues a pipeline job, and returns 200 OK immediately. The pipeline picks up the job, runs compliance, assembles context, calls the AI, persists the turn, and sends the response — all asynchronously.

  • Twilio webhook validated and acknowledged with 200 OK immediately
  • Payload written to message queue — worker picks up and processes asynchronously
  • MessageSid idempotency checked at webhook and pipeline entry point
  • Compliance runs first — opt-out, time windows, frequency before any AI call
  • Full conversation history assembled fresh on every turn
  • Response sent within seconds of the inbound message arriving
Inbound message flow
  1. 1
    Twilio webhook
    Validated, payload written to message queue
  2. 2
    200 OK returned
    Immediate — Twilio never waits for the AI
  3. 3
    Worker picks up
    Job dequeued, MessageSid idempotency checked
  4. 4
    Compliance
    Opt-out, windows, frequency — before any AI call
  5. 5
    Context assembled
    Campaign config + full conversation history
  6. 6
    AI responds
    Message sent within seconds of inbound arrival
Routing and context

The AI always knows which conversation it's in.

Every inbound message is matched to the right campaign and the right conversation. If no open conversation exists, a new one is created. If one exists, the message is attached to it — context is always complete.

Campaign routing

The inbound module resolves which campaign a contact belongs to and loads that campaign's configuration — questions, persona, scheduling level, and business hours — so the AI always has the right context for the right campaign.

How it works: Context assembly loads campaign from conversation — the AI never receives a mismatch between config and conversation history.

Conversation threading

If a contact already has an open conversation for the campaign, the inbound message is attached to it rather than creating a new one. The full history is preserved — the AI reads everything that has already been said.

How it works: A second open conversation for the same contact and campaign is never created — deduplication enforced at the pipeline level.

Unknown contact handling

If an inbound message arrives from a phone number that cannot be matched to any contact in the database, the pipeline exits cleanly without creating any records or calling the AI. No error, no incomplete data.

How it works: Unknown contacts return 200 OK to Twilio with no processing — the platform never creates orphaned records.

Malformed payload handling

If the inbound webhook receives a structurally malformed payload — missing required fields, empty message body, or unexpected format — the pipeline handles it gracefully without raising an unhandled exception or creating a partial record.

How it works: Malformed payloads exit cleanly — no partial database records, no silent errors.

Want to see how inbound replies
are handled in real time?

We'll show you a live campaign conversation — inbound, compliance, AI response in sequence.