AI Agent Impact & Dependencies — "1 CID Multiple WABA"
| Field | Value |
|---|---|
| Kind | Dependency / impact assessment (pre-RFC) |
| Source initiative | [High Level PRD] 1 CID Multiple WABA — Lingga Mahesa (Platform/WhatsApp/Billing), QON/51170246951 |
| Source status | Discovery · target GA Sept 2026 (Meta Coex GA) |
| Grounded against | chatbot (BE) + chatbot-fe (FE), surveyed 2026-06-29 |
TL;DR
Multi-WABA moves Qontak from 1 company = 1 WABA to 1 company = N WABAs and scopes
templates and broadcasts per waba_id (cross-WABA template sends rejected with
422 — Template not valid for this WABA).
The AI Agent is mostly insulated because routing, KB/RAG, actions, and agent identity key
off channel_integration_id / organization_id, never waba_id. The source PRD's
"Chatbot / Automation" edge cases are accurate. However, the PRD under-states three items
that fall to the AI Agent owner and must be tracked as dependencies before Multi-WABA GA.
1. Confirmed STABLE (no change needed)
| Area | Why it survives | Evidence (chatbot repo) |
|---|---|---|
| AI Agent core identity | Scoped to organization_id; no WABA/channel column | app/models/ai_agent.rb |
| Inbound routing → bot | Room → channel_integration_id → Intent; WABA absent from path | app/models/room.rb, app/core/use_cases/system/hub/process_incoming_message_with_resolve.rb |
| AI Agent actions / tool-calls | Target resolved from the room's channel integration | app/core/repositories/node_executions/nodes/mekari_qontak_chat/execute.rb |
| Knowledge base / RAG | Org-scoped (one org = one KB even with N WABAs) | lib/ai_service/ai_agent.rb |
| Outbound bot messages | Always carry channel_integration_id; Hub maps channel → WABA downstream | lib/hub/chat_service/messages/create_message_by_bot.rb |
| In-session idle follow-up | Free-text, not HSM (24h window) → unaffected by template scoping | chatbot-fe/modules/ai-agent/components/forms/AiAgentIdleActionForm.vue |
PRD edge cases re-validated against code: assignment by channel_integration_id survives WABA
migration; Coex channels must be added to routing rules manually; a cross-WABA reply opens a
new independent room. All correct.
2. Gaps the source PRD under-states
Gap 1 — Bot-initiated template/Flow sends are not WABA-aware (latent 422)
- Finding:
intent_whatsapp_flowstorestemplate_id+template_namebut nowaba_id(app/models/intent_whatsapp_flow.rb,app/core/use_cases/system/hub/send_message_whatsapp_flow.rb). - Risk: PRD makes templates WABA-scoped + adds
422enforcement on Direct Send & Broadcast APIs. WhatsApp templates are namespaced per WABA. If one org holds the same template name across two WABAs, send-by-name becomes ambiguous and bot template sends can fail. - Today's protection: 1 agent = 1 channel, so Hub resolves the correct WABA namespace. This protection disappears the moment an agent spans WABAs (see Gap 2).
- Action: Confirm with engineering (RFC
waba_accountsowner — Mochamad Rahmandanu) that Hub resolves the template namespace from the channel's WABA automatically for bot-sent templates. If not, addwaba_idtointent_whatsapp_flow+ validatetemplate.waba_id == channel.waba_idbefore send.
Gap 2 — AI Agent ↔ channel binding is single-channel & auto-picks first channel
- Finding: FE binds an agent to
channels.data[0]— the first channel, no picker (chatbot-fe/modules/ai-agent/components/modals/AiAgentModal.vue,chatbot-fe/store/ai-agent/interface.ts). - Risk: For a multi-brand org (N WABAs, each with channels) "first channel" is arbitrary and brand-blind. Multi-WABA turns an existing fragility into a real defect.
- Action / design decision: Can one AI agent span multiple WABAs, or is it one-agent-per-WABA? Same fork as the PRD's Open Question #1 (consolidated inbox vs. forced WABA selection). Must be resolved before Lingga's Phase 2 design.
Gap 3 — AI Agent telemetry has no WABA/brand dimension
- Finding: PRD adds
waba_idto Broadcast Report, Conversation Report, billing logs, and CSV exports. The AI activity-log datamart (ai_activity_logs) and the Unified Agent Scorecard are org-scoped with no WABA/brand dimension. - Risk: For the enterprise multi-brand clients this initiative unlocks, AI confidence / containment / CSAT cannot be sliced per brand, even though billing now can.
- Action: Add
waba_id(andfbbm_id) as a dimension to the activity-log datamart and scorecard, mirroring how billing now segments per WABA. Own-roadmap item, not a GA blocker.
3. Dependencies to register against the Multi-WABA initiative
| # | Dependency | Owner | Blocks | Type |
|---|---|---|---|---|
| D1 | Hub resolves template namespace from channel WABA for bot sends (or BE adds waba_id to intent_whatsapp_flow + validation) | Chatbot BE + Hub/Platform | Bot template/Flow sends for multi-WABA orgs | Pre-GA blocker |
| D2 | Decide one-agent-multi-WABA vs. one-agent-per-WABA (ties to PRD Open Q1) | AI Agent PM + Platform PM | Phase 2 design | Design decision |
| D3 | Add waba_id/fbbm_id dimension to AI activity-log datamart + scorecard | AI Agent PM + BI | Per-brand AI reporting | Own roadmap (post-GA OK) |
4. Call to action
- Comment on QON/51170246951 raising D1 (namespace) and D3 (reporting parity) so they're captured in Discovery.
- Get D2 added to the PRD's Open Questions list (link to Open Q1).
- Track D1–D3 in the AI Agent backlog; promote D1 to a full chatbot TECH-RFC if Hub does not auto-resolve namespace.
Grounding note: BE = /Users/mekari/work/chatbot, FE = /Users/mekari/work/chatbot-fe. No
broadcast→chatbot trigger path exists in BE (confirmed by search). Idle follow-up confirmed
free-text, not HSM.