Customer Dashboard — Automation
The Automation group is the no-code orchestration hub: Overview (the Automation Hub landing), Auto Workflow (lead-automation builder), WhatsApp Automation (event-driven WhatsApp flows), and IVR Workflow (the call-flow builder). Each builder is gated on its own feature so a customer only sees what it has enabled.
Screenshots




Architecture Overview
How It Works (Step-by-Step)
- Overview (
/automation). The Automation Hub landing. Gated only by the broadautomationRBAC resource so a member without it never sees the hub; the specific builders keep their own resources. - Auto Workflow (
/auto-workflow). A lead-automation workflow builder: CRUD + activate/deactivate + recent runs. Gated by theworkflowfeature +workflowresource. A workflow orchestrates calling, so the module depends on Bulk Calling (MODULE_DEPENDENCIES:workflow → voice_campaign). Backed by Workflow + WorkflowRun. - WhatsApp Automation (
/whatsapp-automation). Event-driven WhatsApp automation definitions: CRUD + activate/pause + a read-only run inspector. Gated bywhatsapp.automation+whatsapp_automationresource +resolveCrmLeadScope. Runs are never mutated over HTTP (GET-only). Depends on WhatsApp (and, for call follow-ups, Bulk Calling). Backed by WaAutomationDefinition + WaAutomationRun + WaFlowDefinition. - IVR Workflow (
/agents/new/ivr-flow). The call-flow builder for routing inbound/outbound calls. Per-agent IVR actions are stored viaivr-action.routes.ts(GET/PUT /api/agents/:agentId/ivr-actions, gated byagentsresource +ai_transfer/call_controlon writes) and the inbound IVR config viainbound-ivr.routes.ts(call_flow_builder). Depends on Bulk Calling. See Call Flow Builder and IVR Flow Agent Type.
File Reference
| File | Role | Key Functions |
|---|---|---|
routes/workflow.routes.ts | Auto Workflow CRUD + lifecycle + runs | createWorkflow, activateWorkflow, getWorkflowRuns |
controllers/workflow.controller.ts | Workflow orchestration | testRunWorkflow |
routes/waAutomation.routes.ts | WhatsApp automation definitions + runs | createDefinition, activateDefinition, listRuns |
routes/ivr-action.routes.ts | Per-agent IVR actions | getIvrActions, updateIvrActions |
routes/inbound-ivr.routes.ts | Inbound IVR config | updateInboundIvrConfig |
app/src/lib/features.ts | Module dependencies (workflow/whatsapp.automation/ivr → voice_campaign) | MODULE_DEPENDENCIES |
Data Model
| Collection | Why it exists | Key fields |
|---|---|---|
Workflow | Auto-workflow definition | trigger, steps, active |
WorkflowRun | One execution of a workflow | status, step results |
WaAutomationDefinition | WhatsApp automation definition | trigger event, steps, active |
WaAutomationRun | One execution (read-only over HTTP) | status, timeline |
WaFlowDefinition | A WhatsApp Flow (screens → Meta Flow JSON) | routing model |
API Endpoints
Auto Workflow
POST /api/workflows(create),GET /api/workflows,PUT /api/workflows/:id,POST /api/workflows/:id/activate+/deactivate,GET /api/workflows/:id/runs.- Auth:
verifyJwt→requireFeatureAccess("workflow")→requirePermission("workflow", view|create|...).
WhatsApp Automation
POST/GET/PUT /api/wa-automations[...],POST /api/wa-automations/:id/activate+/pause,GET /api/wa-automations/:id/runs(and/runs/:runId).- Auth:
verifyJwt→requireFeatureAccess(whatsapp.automation)→requirePermission("whatsapp_automation","view")→resolveCrmLeadScope.
IVR actions / inbound config
GET/PUT /api/agents/:agentId/ivr-actions(agentsresource; writes needai_transfer/call_control+requireRole("customer")).GET/PUT/DELETE /api/agents/:agentId/inbound-ivr-config(call_flow_builder).
External Integrations
- LiveKit — IVR workflows and workflow call steps place calls via the Agent Server.
- WhatsApp (Meta Cloud API) — WhatsApp Automation sends messages/templates over the WhatsApp workspace.
- Agent Server internal fallback —
/internal/agent-ivr-actions/:agentIdand/internal/agent-inbound-ivr-config/:agentIdlet the Agent Server fetch config (x-api-secret auth), not the customer.
How to Test (End-to-End)
- Grant
workflow(+voice_campaign). Open/auto-workflow, create a workflow, activate it, and trigger it; confirm aWorkflowRunappears under runs. - Grant
whatsapp.automation+ WhatsApp. Create a WhatsApp automation, activate, fire its trigger event, and inspect the run (GET-only). - Open IVR Workflow; add an IVR action to an agent (
PUT /api/agents/:id/ivr-actions) and confirm it is applied on a call. - Confirm removing
voice_campaignsurfaces a module-dependency warning when savingworkflowin the admin grid.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| Automation group hidden | None of workflow/whatsapp.automation/call_flow_builder granted | Grant a builder feature |
Saving workflow blocked | Missing voice_campaign prerequisite | Grant Bulk Calling (module dependency) |
| WhatsApp automation runs empty | Trigger event never fired, or definition paused | Fire the event; activate the definition |
| IVR actions PUT 403 | ai_transfer/call_control off, or not a customer role | Grant the feature; use a customer account |