- A WhatsApp inbound referral captures
ctwa_clidfrommessages[].referral.ctwa_clid. - Switchbord stores the click id on the inbound message payload and
conversation_attributions. - Channel-level dataset bindings decide whether a CTWA
Lead,QuoteRequested, orPurchaseevent is eligible. - A
meta_capi_eventsledger row is created with a deterministicevent_id. - The worker processes
meta.capi.dispatchand posts to/{dataset_id}/eventsonly when the binding is enabled and not in dry-run mode.
Dataset binding
Bindings are channel scoped, not global. Use the app API route below from an authenticated owner/admin context:dryRun=true until Events Manager shows test events with the expected payload shape. Production dispatch (dryRun=false) is rejected unless a testEventCode is present and the existing binding has been marked verified (health_status='ok' with last_verified_at).
Event ids
Switchbord uses deterministic ids for deduplication:Lead:meta-capi:lead:{workspaceId}:{conversationId}:{attributionId}QuoteRequested:meta-capi:quote:{workspaceId}:{reservationTravioId}:{attributionId}Purchase:meta-capi:purchase:{workspaceId}:{reservationTravioId}:{confirmationTimestamp}
unique (workspace_id, event_id).
Payload rules
Every dispatch payload uses:action_source: business_messagingmessaging_channel: whatsapppartner_agent: switchborduser_data.ctwa_clidwhen availableuser_data.page_idwhen configured- hashed phone/external id only; do not store or send raw phone numbers
custom_data.valueandcustom_data.currencyfor quote/purchase value when present
Authorization: Bearer *** header, never as URL query parameters.
Rollout
- Configure binding with
enabled=true,dryRun=true, and a test event code. - Replay or wait for a CTWA inbound with
ctwa_clid. - Confirm
meta_capi_events.status = 'dry_run'and payload preview has no token. - Send Events Manager test events.
- Flip one channel to
dryRun=falseforLeadonly. - Enable
QuoteRequestedandPurchaseonly after Travio/status-3 source-of-truth integration is verified.
enabled=false or dryRun=true on the channel binding.