Architecture
Four pillars, one deterministic dispatch path
Every state transition is explicit, persisted before it is announced, and auditable after the fact.
01
Parallel Outbound Race Locking
N providers are called at once. The first acceptance wins an atomic HUNTING → LOCKED transition inside a single-threaded Durable Object. Late acceptors are told the job is taken; losing calls are stood down idempotently. If nobody accepts before the deadline, the request moves to EXHAUSTED and escalates to a human.
02
Verified WhatsApp Geo-Intake
Customers share a location pin over the WhatsApp Business Platform after explicit opt-in. Webhooks are signature-verified with constant-time comparison before any parsing, and de-duplicated through an idempotency ledger. Verbal addresses fall back to geocoding only when no pin is available.
03
Domain-Agnostic Workflow Engine
One core, many verticals: field dispatch and clinical scheduling run on the same engine. Each service defines its own intake schema, location policy and fulfillment strategy. Internal calendar, outbound voice dispatch, external webhook and human escalation each support create, reschedule, cancel and status inquiry.
04
Layered EU GDPR & Turkish KVKK Data Residency
Baseline redaction and retention controls apply everywhere. PII and recordings sit behind vault abstractions that can be placed in Belgian/EU or Turkish regions, and the voice engine is replaceable by a regional stack. Tenants are isolated on every table and every query.
// dispatch.locked — emitted after the state transition is persisted
{
"event": "dispatch.locked",
"tenant_id": "ten_…",
"request_id": "req_…",
"state": { "from": "HUNTING", "to": "LOCKED" },
"provider_id": "prv_…",
"eta_minutes": 10, // as stated by the provider
"stood_down_calls": 1
}