AurionAI Docs

Automation & Workflows

Build automation rules and visual workflows to streamline support operations.

Automation & Workflows

Aurion provides two levels of automation: Automation Rules for simple event-driven triggers, and Workflows for complex multi-step processes with branching logic, approvals, and integrations.


Automation Rules

Automation rules are simple if-then automations that fire on specific events.

List Rules

cURL
curl "https://apps.aurionai.net/api/v2/automation-rules" \
  -H "X-API-Key: ak_live_xxxx"

Response:

{
  "data": [
    {
      "id": "rule_abc123",
      "name": "Auto-assign VPN tickets to Network team",
      "trigger": "ticket.created",
      "conditions": [
        {"field": "category", "operator": "equals", "value": "Network"}
      ],
      "actions": [
        {"type": "assign_team", "team_id": "team_network"}
      ],
      "enabled": true,
      "priority": 1,
      "created_at": "2026-02-01T10:00:00Z"
    }
  ],
  "total": 12,
  "limit": 25,
  "offset": 0
}

Create Rule

curl -X POST "https://apps.aurionai.net/api/v2/automation-rules" \
  -H "X-API-Key: ak_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Escalate urgent tickets",
    "trigger": "ticket.created",
    "conditions": [
      {"field": "priority", "operator": "equals", "value": "urgent"}
    ],
    "actions": [
      {"type": "assign_team", "team_id": "team_escalation"},
      {"type": "send_notification", "template": "urgent_ticket"}
    ],
    "enabled": true,
    "priority": 1
  }'

Delete Rule

curl -X DELETE "https://apps.aurionai.net/api/v2/automation-rules/rule_abc123" \
  -H "X-API-Key: ak_live_xxxx"

Returns 204 No Content on success.

Rule Execution Logs

View the execution history for a specific rule:

curl "https://apps.aurionai.net/api/v2/automation-rules/rule_abc123/logs?limit=20" \
  -H "X-API-Key: ak_live_xxxx"

Global Execution Logs

View execution logs across all automation rules:

curl "https://apps.aurionai.net/api/v2/automation-rules/logs?limit=50" \
  -H "X-API-Key: ak_live_xxxx"

Response:

[
  {
    "id": "log_abc123",
    "rule_id": "rule_abc123",
    "rule_name": "Auto-assign VPN tickets",
    "event_type": "ticket.created",
    "conversation_id": "conv_xyz",
    "status": "success",
    "actions_executed": 2,
    "executed_at": "2026-02-10T14:30:00Z"
  }
]

Trigger Event

Programmatically fire an automation event to execute matching rules:

curl -X POST "https://apps.aurionai.net/api/v2/automation-rules/execute-event" \
  -H "X-API-Key: ak_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "event_type": "ticket.created",
    "conversation_id": "conv_xyz",
    "payload": {
      "category": "Network",
      "priority": "high"
    }
  }'

Response:

{
  "rules_evaluated": 12,
  "rules_matched": 2,
  "actions_executed": 3
}

Workflows

Workflows are visual, multi-step automations with branching, approvals, and version control.

List Workflows

curl "https://apps.aurionai.net/api/v2/workflows?status=published" \
  -H "X-API-Key: ak_live_xxxx"

Create Workflow

curl -X POST "https://apps.aurionai.net/api/v2/workflows" \
  -H "X-API-Key: ak_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "New Employee Onboarding",
    "description": "Automated onboarding workflow for new hires",
    "canvas": {
      "nodes": [
        {"id": "start", "type": "trigger", "config": {"event": "ticket.created"}},
        {"id": "check", "type": "condition", "config": {"field": "category", "equals": "Onboarding"}},
        {"id": "create_accounts", "type": "action", "config": {"type": "create_ticket", "subject": "Create accounts for new hire"}},
        {"id": "notify", "type": "action", "config": {"type": "send_notification"}}
      ],
      "edges": [
        {"from": "start", "to": "check"},
        {"from": "check", "to": "create_accounts", "condition": "true"},
        {"from": "create_accounts", "to": "notify"}
      ]
    }
  }'

Publish Workflow

Workflows must be published before they execute. Publishing creates a versioned snapshot:

curl -X POST "https://apps.aurionai.net/api/v2/workflows/wf_abc123/publish" \
  -H "X-API-Key: ak_live_xxxx"

Execute Workflow

Trigger a workflow manually with input data:

curl -X POST "https://apps.aurionai.net/api/v2/workflows/wf_abc123/execute" \
  -H "X-API-Key: ak_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "input": {
      "employee_name": "Jane Smith",
      "department": "Engineering",
      "start_date": "2026-03-15"
    }
  }'

Dry Run

Test a workflow without executing side effects:

curl -X POST "https://apps.aurionai.net/api/v2/workflows/dry-run" \
  -H "X-API-Key: ak_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "canvas": { ... },
    "input": { ... }
  }'

Webhook Triggers

Workflows can be triggered by external webhooks. Each workflow has a unique webhook URL with HMAC-SHA256 signature verification:

curl -X POST "https://apps.aurionai.net/api/v2/workflows/webhook/wf_abc123" \
  -H "X-Webhook-Signature: sha256=..." \
  -H "Content-Type: application/json" \
  -d '{"event": "deploy_completed", "version": "2.4.0"}'

Workflow Approvals

Workflows can pause at approval steps and wait for human decision:

List pending approvals
curl "https://apps.aurionai.net/api/v2/workflows/approvals/pending" \
  -H "X-API-Key: ak_live_xxxx"
Approve or reject
curl -X POST "https://apps.aurionai.net/api/v2/workflows/approvals/req_123/decide" \
  -H "X-API-Key: ak_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{"decision": "approved", "comment": "Looks good, proceed."}'

Workflow Runs

Monitor workflow execution history:

curl "https://apps.aurionai.net/api/v2/workflows/runs?workflow_id=wf_abc123&limit=10" \
  -H "X-API-Key: ak_live_xxxx"

Version History

Workflows support version control and rollback:

List versions
curl "https://apps.aurionai.net/api/v2/workflows/wf_abc123/versions" \
  -H "X-API-Key: ak_live_xxxx"
Restore previous version
curl -X POST "https://apps.aurionai.net/api/v2/workflows/wf_abc123/versions/3/restore" \
  -H "X-API-Key: ak_live_xxxx"

Workflow Templates

Get started quickly with pre-built templates:

curl "https://apps.aurionai.net/api/v2/workflows/templates?category=onboarding" \
  -H "X-API-Key: ak_live_xxxx"
Install template
curl -X POST "https://apps.aurionai.net/api/v2/workflows/templates/tpl_abc/install" \
  -H "X-API-Key: ak_live_xxxx"

Migrate from Automation Rules

Migrate simple automation rules to the workflow engine:

curl -X POST "https://apps.aurionai.net/api/v2/workflows/migrate-from-rule/rule_abc123" \
  -H "X-API-Key: ak_live_xxxx"

Canvas Size Limit

Workflow canvas JSON is limited to 5 MB per workflow.


AI Automation

AI-powered classification, routing, and resolution that works alongside automation rules and workflows. Configure thresholds and behavior, manage routing rules, and monitor performance.

Get AI Automation Settings

curl "https://apps.aurionai.net/api/v2/ai-automation/settings" \
  -H "X-API-Key: ak_live_xxxx"

Response:

{
  "classification": {
    "enabled": true,
    "auto_apply_threshold": 0.85,
    "suggest_threshold": 0.5,
    "auto_apply_fields": ["category", "priority", "conversation_type"],
    "classify_on": ["conversation.created", "conversation.customer_replied"],
    "reclassify_on_reply": true,
    "exclude_channels": []
  },
  "routing": {
    "enabled": true,
    "route_on_first_classification_only": true,
    "skills_timeout_seconds": 300,
    "fallback_to_team_pool": true,
    "ai_skill_matching_enabled": false
  },
  "resolution": {
    "enabled": false,
    "mode": "suggest",
    "auto_resolve_threshold": 0.92,
    "kb_match_threshold": 0.9,
    "max_auto_resolve_attempts": 2,
    "exclude_high_priority": true
  },
  "version": 3,
  "updated_at": "2026-02-10T14:00:00Z"
}

Update AI Automation Settings

Partial update -- only include the sections you want to change:

curl -X PUT "https://apps.aurionai.net/api/v2/ai-automation/settings" \
  -H "X-API-Key: ak_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "classification": {
      "enabled": true,
      "auto_apply_threshold": 0.9
    },
    "resolution": {
      "enabled": true,
      "mode": "suggest"
    }
  }'

Returns the full updated settings object (same shape as GET).

AI Automation Metrics

Aggregated metrics for classification, routing, and resolution over a time period:

curl "https://apps.aurionai.net/api/v2/ai-automation/metrics?days=30" \
  -H "X-API-Key: ak_live_xxxx"

Response:

{
  "period_days": 30,
  "classification": {
    "total_classified": 482,
    "auto_applied": 410,
    "suggested": 45,
    "agent_overridden": 12,
    "auto_apply_rate": 0.8506,
    "override_rate": 0.0293
  },
  "routing": {
    "total_routed": 398,
    "overflow_used": 15,
    "routing_failed": 3,
    "first_assignment_accuracy": 0.9246,
    "avg_time_to_route_ms": 120
  },
  "resolution": {
    "total_attempted": 200,
    "auto_resolved": 85,
    "suggested": 90,
    "skipped": 25,
    "resolution_rate": 0.425,
    "suggestion_acceptance_rate": 0.78
  },
  "funnel": {
    "classified": 482,
    "routed": 398,
    "resolved": 85
  }
}

Resolution Audit Log

View recent AI resolution decisions with confidence scores:

curl "https://apps.aurionai.net/api/v2/ai-automation/resolution/audit?limit=20" \
  -H "X-API-Key: ak_live_xxxx"

Response:

[
  {
    "id": "aud_abc123",
    "conversation_id": "conv_xyz",
    "action": "auto_resolved",
    "mode": "auto",
    "classification_confidence": 0.95,
    "kb_match_score": 0.93,
    "reply_coherence_score": 0.88,
    "combined_confidence": 0.94,
    "skip_reason": null,
    "model_used": "claude-sonnet-4-20250514",
    "created_at": "2026-02-10T14:30:00Z"
  }
]

Simulate Routing

Test how a conversation would be routed without actually routing it:

curl -X POST "https://apps.aurionai.net/api/v2/ai-automation/routing/simulate" \
  -H "X-API-Key: ak_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "category": "Network",
    "priority": "high",
    "conversation_type": "incident",
    "sentiment": "negative"
  }'

Response:

{
  "matched_rule": {
    "id": "rr_abc123",
    "sort_order": 2,
    "category": "Network",
    "priority": "high"
  },
  "matched_team_id": "team_network",
  "overflow_team_id": "team_general",
  "required_skills": ["networking"],
  "routing_method": "balanced",
  "message": "Rule matched."
}

List Routing Rules

curl "https://apps.aurionai.net/api/v2/ai-automation/routing/rules" \
  -H "X-API-Key: ak_live_xxxx"

Response:

[
  {
    "id": "rr_abc123",
    "tenant_id": "t_xyz",
    "category": "Network",
    "priority": "high",
    "conversation_type": null,
    "sentiment": null,
    "target_team_id": "team_network",
    "overflow_team_id": "team_general",
    "required_skills": ["networking"],
    "routing_method": "balanced",
    "priority_boost": 1,
    "sort_order": 0,
    "is_active": true,
    "created_at": "2026-02-01T10:00:00Z",
    "updated_at": "2026-02-01T10:00:00Z"
  }
]

Create Routing Rule

curl -X POST "https://apps.aurionai.net/api/v2/ai-automation/routing/rules" \
  -H "X-API-Key: ak_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "category": "Security",
    "priority": "urgent",
    "target_team_id": "team_security",
    "required_skills": ["security", "incident_response"],
    "routing_method": "round_robin",
    "priority_boost": 2,
    "sort_order": 0,
    "is_active": true
  }'

Update Routing Rule

curl -X PUT "https://apps.aurionai.net/api/v2/ai-automation/routing/rules/rr_abc123" \
  -H "X-API-Key: ak_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "priority_boost": 0,
    "is_active": false
  }'

Delete Routing Rule

curl -X DELETE "https://apps.aurionai.net/api/v2/ai-automation/routing/rules/rr_abc123" \
  -H "X-API-Key: ak_live_xxxx"

Returns 204 No Content on success.

Reorder Routing Rules

Update the evaluation order of routing rules. Rules are evaluated top-to-bottom (lowest sort_order first):

curl -X POST "https://apps.aurionai.net/api/v2/ai-automation/routing/rules/reorder" \
  -H "X-API-Key: ak_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "ordered_ids": ["rr_security", "rr_network", "rr_general"]
  }'

Returns 204 No Content on success. The position in the ordered_ids array becomes the new sort_order.

Required Scopes

ScopeEndpoints
automation:readGET /v2/automation-rules, GET /v2/automation-rules/logs, GET /v2/workflows, GET /v2/workflows/runs, GET /v2/ai-automation/settings, GET /v2/ai-automation/metrics, GET /v2/ai-automation/resolution/audit, GET /v2/ai-automation/routing/rules
automation:writePOST /v2/automation-rules, DELETE /v2/automation-rules/:id, POST /v2/automation-rules/execute-event, POST /v2/workflows, POST /v2/workflows/:id/publish, POST /v2/workflows/:id/execute, PUT /v2/ai-automation/settings, POST /v2/ai-automation/routing/simulate, POST /v2/ai-automation/routing/rules, PUT /v2/ai-automation/routing/rules/:id, DELETE /v2/ai-automation/routing/rules/:id, POST /v2/ai-automation/routing/rules/reorder

On this page