Macros
Canned responses that also change the ticket, and the triggers that run them without a click.
A macro is an ordered list of actions applied to a ticket in one step. Most macros are a prepared reply plus the tidying that always goes with it: set the status, add a tag, move the priority.
Macros live at Settings, Macros. Agents apply them from the macro picker in the ticket composer.
What a macro can do
Each macro carries between one and ten actions, run top to bottom.
| Action | What it does |
|---|---|
reply | Posts a customer-facing reply. Needs body text. |
internal_note | Posts an internal note. Needs body text. |
set_status | Sets the status to open, pending, on hold, solved or closed. |
set_priority | Sets the priority to low, normal, high or urgent. |
add_tag | Adds one tag. Existing tags are kept. |
That is the whole vocabulary. A macro cannot assign a ticket, route it to a team, link a customer or send anything outside the ticket.
Creating one
New macro asks for a name, an optional description and the action list. Names are unique in the workspace, and the description is what agents see in the picker, so it is worth writing.
The enabled toggle matters more than it looks. A disabled macro cannot be applied by hand and never fires on a trigger. Disabling is the safe way to retire a macro without deleting it.
Editing the action list replaces it wholesale. Deleting a macro is admin only, and the timeline entries it has already written keep their provenance.
The list shows a use count per macro, so you can see which ones your team actually reaches for.
Applying one by hand
Open a ticket, press the macro picker in the composer toolbar, and choose. Every action runs against the ticket as a single step.
Only enabled macros appear. Applying a macro that has been disabled or deleted since the page loaded is refused rather than half applied.
Triggers: macros that fire on their own
A macro can carry a trigger, which makes it fire without anybody clicking. A macro with no trigger is manual only, and that is the default.
A trigger has two parts.
When. One or both of create and update. Ticket create is exactly what it
sounds like. Update covers an edit, a reply, a reopen and a bulk change.
Conditions. A list of tests, all of which must pass. An empty condition list always matches, so the macro fires on every ticket for the events named.
Conditions read one of these fields: status, priority, source, team_id,
assignee_id, tag or subject. The comparisons available are eq, neq,
in, not_in, is_set, is_unset and contains. A macro may carry up to 20
conditions.
Tags are the one field a ticket has several of, and every comparison reads them
as "does any tag satisfy this". is_set on tag means the ticket has at least
one tag.
An absent field behaves the way you would want: a ticket with no team is not on
team X, so neq and not_in are true for it and every positive comparison is
false.
Triggers are configured through the API
The macro editor in Studio manages the name, description, actions and enabled
flag. It does not edit triggers. To attach one, use POST /v1/macros or
PATCH /v1/macros/{macro_id} and send a trigger object. Sending
"trigger": null on a patch returns the macro to manual only; leaving the key
out entirely leaves the trigger alone. See the API reference.
How triggered macros are selected
Worth understanding, because it is what stops a macro loop.
When a ticket is written, the evaluator takes one snapshot of the ticket's state after that write, picks every enabled macro whose trigger names the event and whose conditions match that snapshot, and applies them in creation order. It does not look again in between.
Two consequences:
- A macro fires at most once per ticket per write. A change made by a triggered macro cannot cause a fresh round of selection, so a macro that matches its own output does not loop, and two macros that each trigger the other terminate as well.
- The order does not depend on what earlier macros changed, because the order was fixed before any of them ran.
A macro that fails does so on its own. The ticket write that triggered it still stands, and the other macros are unaffected.