Two related but distinct systems. Automation reacts to events and runs actions. Workflow tracks work items moving through stages, with assignment, escalation and SLAs.
Automation
/automationJWT/automationJWT/automation/:automationIdJWT/automation/:automationIdJWT/automation/:automationIdJWTRunning them:
/automation/start/:automationIdJWT/automation/stop/:automationIdJWT/automation/:automationId/executeJWT/automation/status/:automationIdJWTstart and stop enable and disable an automation; execute runs it once immediately, which is how you test without waiting for a trigger.
/automation/healthJWT/automation/dashboard/statsJWT/automation/execution/historyJWTHow an automation is built
An automation has three parts:
| Part | Role |
|---|---|
| Trigger | What starts a run — a record changing, a schedule, an inbound message, a webhook |
| Condition | What must hold for the run to continue |
| Action | What it does — send, create, update, call out, escalate |
Interactive voice response flows are built the same way, with the call itself as the trigger.
Create lead (create_lead) creates the lead through the leads service — the same path as a lead added by hand, so it gets a lead number, a score and its pipeline stage. Its config takes firstName / lastName or fullName (split into the two), email, phone, company, jobTitle, notes, description, source, sourceDetails, pipelineId, stageId, assignedTo, value, tags and customFields; string values may use {{…}} variables from the triggering record (for a form submission, {{data.values.<field>}}). A variable that resolves to nothing is dropped rather than stored as {{…}}. Paired with a form_submission trigger, it is how a web form fills the pipeline.
Execution is asynchronous. automation.consumer and automation-trigger.consumer read from schedule-queue, so a long-running automation does not block the request that fired it.
Datatypes: automation, automation_execution, automation_log.
AI-assisted authoring
/automation/ai/generateJWT/automation/ai/improveJWT/automation/ai/validateJWT/automation/ai/templatesJWTDescribe the automation in prose and get a definition back; validate checks one before saving.
IVR
Phone menus are automations. Calls route through ivr_routing and sms_routing records. See Voice and phone.
Workflow
A generic work-item engine — POS tickets, kitchen orders, reservations, approvals. Records are task, definitions are workflow_definition, and any BaseModel can carry one in its workflow field.
Definitions
/workflow/definitionJWT/workflow/definitionJWT/workflow/definition/from-template/:nameJWT/workflow/definition/:idJWT/workflow/definition/:idJWTTemplates are seeded by POST /business-made/setup/workflows.
Firing work
/workflow/fireJWTThe single primitive that creates a task against a definition. The POS "fire to kitchen" action and a reservation arrival both come through here.
Tasks
/workflow/taskJWT/workflow/task/:taskIdJWT/workflow/task/:taskId/historyJWT/workflow/task/:taskId/advanceJWT/workflow/task/:taskId/move-to/:stageIdJWT/workflow/task/:taskId/completeJWT/workflow/task/:taskId/cancelJWT/workflow/task/:taskId/reassignJWT/workflow/task/:taskId/noteJWT/workflow/task/:taskId/archiveJWT/workflow/task/:taskId/unarchiveJWT/workflow/task/restartJWTadvance moves to the next stage in the definition; move-to/:stageId jumps to a named one.
SLAs and escalation
This is what distinguishes the workflow engine from a status field.
/workflow/task/:taskId/slaJWT/workflow/escalation/breachedJWT/workflow/escalation/upcomingJWT/workflow/task/:taskId/snoozeJWT/workflow/task/:taskId/escalate-nowJWTupcoming is the list to act on; breached is the list to explain. Escalation runs on a queue processor (escalation.processor).
Analytics
/workflow/analytics/:workflowId/wait-timesJWT/workflow/analytics/task/:taskId/etaJWTeta predicts completion from historical wait times — what a customer-facing "ready in about 12 minutes" display uses.
Related
- Check-in queue — a workflow surface for arrivals