Skip to content

Automation rules ​

Automation rules run actions when tickets match triggers you define. Configure them in Settings → Routing & SLA, under Advanced, as a JSON array.

Available on Plus (up to 20 rules) and Enterprise (up to 25 rules).

Rule shape ​

Each rule is an object with:

FieldRequiredDescription
idNoStable identifier. If omitted, Ogma assigns one (rule-1, rule-2, …) when you save.
enabledNoDefaults to true. Disabled rules are ignored.
nameNoLabel shown in escalation reasons. Max 80 characters. Defaults to Rule 1, Rule 2, …
triggerYesWhen to evaluate this rule (see below).
matchFor message_containsCase-insensitive text to look for in new customer messages. Max 200 characters. A message_contains rule without match never fires.
ticketTypeIdNoIf set, the rule only runs for tickets of that ticket type id.
actionsYesOne or more actions to run when the rule matches.

Triggers ​

TriggerWhen it fires
ticket_openedA new ticket channel is created.
ticket_escalatedA ticket is escalated to staff.
message_containsA customer posts a message in a ticket that contains match. Staff messages are ignored.
customer_frustratedFrustration detection flags a customer message. Needs frustration detection turned on in Settings → AI & voice.
csat_negativeThe customer submits a negative CSAT rating after close.
sla_breachA ticket misses its first-response SLA target.

Actions ​

ActionEffect
{ "type": "add_tag", "tag": "billing" }Adds a tag to the ticket (max 40 characters) and sends the ticket.tagged webhook.
{ "type": "escalate" }Escalates the ticket to staff and pauses bot replies. Does nothing if bot replies are already paused.
{ "type": "assign_round_robin" }Assigns the ticket using your Routing & SLA auto-assignment mode (round robin or load balanced). Does nothing if auto-assignment is off or set to manual.

Each rule needs at least one valid action. Rules with an unknown trigger or no valid actions are dropped when you save.

Example ​

json
[
  {
    "id": "refund-escalate",
    "enabled": true,
    "name": "Escalate refund requests",
    "trigger": "message_contains",
    "match": "refund",
    "ticketTypeId": "billing",
    "actions": [
      { "type": "add_tag", "tag": "refund" },
      { "type": "escalate" }
    ]
  },
  {
    "id": "assign-escalations",
    "enabled": true,
    "name": "Assign escalated tickets",
    "trigger": "ticket_escalated",
    "actions": [{ "type": "assign_round_robin" }]
  },
  {
    "id": "tag-frustrated",
    "name": "Tag frustrated customers",
    "trigger": "customer_frustrated",
    "actions": [{ "type": "add_tag", "tag": "frustrated" }]
  }
]

Paste a JSON array of rules into the editor, then save. Ogma validates and normalises the rules when it saves them.

Tips ​

  • Turn on auto-assignment under Settings → Routing & SLA before using assign_round_robin. New tickets are already assigned when auto-assignment is on, so assign_round_robin is most useful on later triggers such as ticket_escalated.
  • Use ticketTypeId to scope noisy keyword rules to a single ticket type.
  • Escalation from a rule records the rule name in the escalation reason, so staff can see why it happened.

Related: Support ops · Settings · Tickets · Insights

Ogma — answer once, reuse forever. · FiniAC · Blog · llm.txt (full docs for LLMs)