Skip to content
Zentra ZentraITSM
Docs / Automation

Automation & workflow

A configurable engine for the routine work humans shouldn't be doing twice. Triggers, conditions, branches, approvals — every execution recorded for audit.

Three layers, one engine

Zentra has three surfaces on top of the same underlying execution engine:

  • Workflow definitions (WorkflowDefinition) — multi-step processes with triggers, conditions, branches, and actions. The main automation surface.
  • Scenario definitions (ScenarioDefinition) — manually-triggered automations the agent kicks off from the console.
  • Automation rules (AutomationRule) — the legacy rule system; new automations should use workflows.

All three execute under the same security model and audit trail. Each execution is recorded on WorkflowExecution with inputs, outputs, and per-step timings.

Triggers

Triggers define when a workflow runs. Common trigger sources:

TriggerFires when
ticket.createdA new ticket arrives via any channel.
ticket.updatedAny field on a ticket changes.
ticket.status_changedStatus transitions (e.g. open → in_progress).
ticket.sla_breachedSLA timer expires.
change.approvedA change record completes its approval graph.
asset.lifecycle_changedAn asset transitions state (e.g. deployed → retired).
schedule.cronTime-based trigger.
webhook.receivedInbound webhook hits a configured Zentra endpoint.

The full trigger catalog is exposed in the workflow editor.

Conditions

Conditions are boolean expressions over the trigger payload. The visual editor supports:

  • Field comparisons: priority = "urgent", category in ["Network", "Identity"], requester.organizationId = "org_...".
  • Asset and CMDB lookups: ticket.linkedAsset.criticality <= 1.
  • Logical combinators: AND, OR, NOT, with explicit grouping.

Actions

Actions modify state, talk to other systems, or wait for input.

CategoryExamples
TicketSet field, assign team or agent, transition status, add internal note, post reply, link, escalate.
ApprovalRequest approval (sequential or parallel), wait for outcome, branch on result.
NotificationEmail (via configured SMTP), Slack channel/DM, Microsoft Teams channel/DM.
Outbound webhookPOST to a registered OutboundWebhook endpoint with HMAC-signed payload.
AssetUpdate lifecycle, attach contract, schedule renewal alert.
Flow controlWait, branch on condition, parallel block, terminate.

Example: escalate urgent tickets

WHEN  ticket.created
WHERE priority = "urgent"
        AND category = "Network"
THEN  set team           = "Network"
      add internal note  = "Auto-routed by urgency rule"
      notify slack       = "#incidents"

Example workflow: new joiner provisioning

A canonical multi-step process with approvals and integration actions:

  1. Trigger: webhook from HR system on new joiner record.
  2. Action: create three tickets — provision laptop (Field IT), create accounts (IAM), assign desk (Facilities).
  3. Action: request approval from the joiner’s line manager.
  4. Wait: until approval received, or 48 hours.
  5. Branch:
    • If approved → mark all child tickets as ready and notify Field IT.
    • If rejected or timed out → notify HR and mark child tickets cancelled.
  6. Action: schedule a 30-day check-in survey to the new joiner.

Approvals

The ApprovalRequest model is first-class and shared across changes, requests, and any custom workflow that needs gating.

  • Approver scope — a specific user, a role, a group, or a dynamic expression (e.g. requester’s line manager).
  • Order — sequential (each in turn) or parallel (any one suffices, or all must approve).
  • Reminders — Nth-hour reminders before timeout.
  • Decision channels — email, Slack notification, Teams notification, agent console.

Every decision is recorded on ApprovalDecision with user, timestamp, and optional comment, and is immutable.

Audit & versioning

Workflows are versioned. Every WorkflowExecution records the workflow version that ran, the inputs, the path taken, and the outputs of every action — so you can answer “what happened to this ticket and why” long after the fact.

Next