Clone
1
Rules
Jonathan Miller edited this page 2026-05-13 01:21:39 +00:00

Automation Rules

Rules are stored in #__ats_automation_rules and define how events map to tickets.

Schema

Column Type Description
id int Auto-increment primary key
title varchar(255) Human-readable rule name
event varchar(255) Event pattern to match
catid int ATS category ID for created tickets
priority tinyint Ticket priority (0=normal)
status varchar(2) Initial ticket status (O=open, P=pending)
public tinyint 0=private, 1=public ticket
assigned_to int Staff user ID to auto-assign
title_template varchar(1024) Ticket title with {placeholders}
body_template text HTML body with {placeholders}
enabled tinyint 0=disabled, 1=enabled
ordering int Rule evaluation order
params text JSON params (e.g., {"dedupe_hours": 24})

Event Pattern Matching

The event column supports:

  • Exact match: user.created
  • Wildcard: com_content.* (matches any com_content event)
  • Multi-event: user.created,user.updated (comma-separated)

Placeholders

Template strings use {key} placeholders replaced with context values at runtime.

Available Placeholders by Event

user.created

  • {username} — New user's username
  • {name} — Full name
  • {email} — Email address
  • {user_id} — Joomla user ID

*.unpublished / *.trashed

  • {context} — Component context (e.g., com_content.article)
  • {content_id} — Content item ID
  • {new_state} — New state value (0=unpublished, -2=trashed)

Deduplication

Each rule can set dedupe_hours in its params JSON. If a ticket with the same event tag and user was created within that window, the rule is skipped. Default: 24 hours.