Skip to content

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 ​

Automation Hub — overviewAuto Workflow — lead-automation builderWhatsApp AutomationIVR Workflow — call-flow builder

Architecture Overview ​

How It Works (Step-by-Step) ​

  1. Overview (/automation). The Automation Hub landing. Gated only by the broad automation RBAC resource so a member without it never sees the hub; the specific builders keep their own resources.
  2. Auto Workflow (/auto-workflow). A lead-automation workflow builder: CRUD + activate/deactivate + recent runs. Gated by the workflow feature + workflow resource. A workflow orchestrates calling, so the module depends on Bulk Calling (MODULE_DEPENDENCIES: workflow → voice_campaign). Backed by Workflow + WorkflowRun.
  3. WhatsApp Automation (/whatsapp-automation). Event-driven WhatsApp automation definitions: CRUD + activate/pause + a read-only run inspector. Gated by whatsapp.automation + whatsapp_automation resource + resolveCrmLeadScope. Runs are never mutated over HTTP (GET-only). Depends on WhatsApp (and, for call follow-ups, Bulk Calling). Backed by WaAutomationDefinition + WaAutomationRun + WaFlowDefinition.
  4. IVR Workflow (/agents/new/ivr-flow). The call-flow builder for routing inbound/outbound calls. Per-agent IVR actions are stored via ivr-action.routes.ts (GET/PUT /api/agents/:agentId/ivr-actions, gated by agents resource + ai_transfer/call_control on writes) and the inbound IVR config via inbound-ivr.routes.ts (call_flow_builder). Depends on Bulk Calling. See Call Flow Builder and IVR Flow Agent Type.

File Reference ​

FileRoleKey Functions
routes/workflow.routes.tsAuto Workflow CRUD + lifecycle + runscreateWorkflow, activateWorkflow, getWorkflowRuns
controllers/workflow.controller.tsWorkflow orchestrationtestRunWorkflow
routes/waAutomation.routes.tsWhatsApp automation definitions + runscreateDefinition, activateDefinition, listRuns
routes/ivr-action.routes.tsPer-agent IVR actionsgetIvrActions, updateIvrActions
routes/inbound-ivr.routes.tsInbound IVR configupdateInboundIvrConfig
app/src/lib/features.tsModule dependencies (workflow/whatsapp.automation/ivr → voice_campaign)MODULE_DEPENDENCIES

Data Model ​

CollectionWhy it existsKey fields
WorkflowAuto-workflow definitiontrigger, steps, active
WorkflowRunOne execution of a workflowstatus, step results
WaAutomationDefinitionWhatsApp automation definitiontrigger event, steps, active
WaAutomationRunOne execution (read-only over HTTP)status, timeline
WaFlowDefinitionA 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 (agents resource; writes need ai_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/:agentId and /internal/agent-inbound-ivr-config/:agentId let the Agent Server fetch config (x-api-secret auth), not the customer.

How to Test (End-to-End) ​

  1. Grant workflow (+ voice_campaign). Open /auto-workflow, create a workflow, activate it, and trigger it; confirm a WorkflowRun appears under runs.
  2. Grant whatsapp.automation + WhatsApp. Create a WhatsApp automation, activate, fire its trigger event, and inspect the run (GET-only).
  3. Open IVR Workflow; add an IVR action to an agent (PUT /api/agents/:id/ivr-actions) and confirm it is applied on a call.
  4. Confirm removing voice_campaign surfaces a module-dependency warning when saving workflow in the admin grid.

Troubleshooting ​

SymptomCauseFix
Automation group hiddenNone of workflow/whatsapp.automation/call_flow_builder grantedGrant a builder feature
Saving workflow blockedMissing voice_campaign prerequisiteGrant Bulk Calling (module dependency)
WhatsApp automation runs emptyTrigger event never fired, or definition pausedFire the event; activate the definition
IVR actions PUT 403ai_transfer/call_control off, or not a customer roleGrant the feature; use a customer account

Last updated: