Automation Rules

Automate triage, tagging, assignment, reminders, and escalations.

Rule anatomy

Automation rules are a simple pipeline: triggerconditionsactions. Rules run top-to-bottom, and you can stop evaluation when one matches.

Rule skeleton
name: "High-impact billing escalation"
trigger: ticket.created
if:
  - ticket.tags includes "billing"
  - ticket.priority == "high"
then:
  - assign.team "Ops"
  - notify.webhook "oncall"
  - add.internal_note "Escalated per billing SLA"

Triggers

  • ticket.created, ticket.updated, ticket.message_received
  • sla.warning, sla.breached
  • moderation.case_opened, moderation.action_taken

Conditions

Conditions can reference ticket metadata, form answers, message content, requester attributes, and business-hours windows.

Tip
Start with deterministic conditions (form fields, tags) before relying on natural language.

Actions

  • Assign ticket owner or team
  • Add/remove tags
  • Post internal notes
  • Send alerts (email, webhook, pager)
  • Close tickets (with guardrails)

Testing and dry runs

Use dry runs to preview what a rule would do without performing actions. Dry runs are available in the editor and via the API.

Dry run (curl)
curl -X POST https://api.stavent.gg/v1/automations/dry-run \
  -H "Authorization: Bearer $STAVENT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"ticketId":"tkt_9f3b...","ruleId":"rule_escalate_billing"}'
Found an issue? Send feedback.