> ## Documentation Index
> Fetch the complete documentation index at: https://docs.decimal.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Triggers

> Choose what starts an automation: a ticket event, an SLA deadline, a Slack message, a schedule, or a click.

The trigger, set next to **When**, decides when an automation runs. Each automation has one trigger.

## At a glance

| Trigger | Runs when | Delay |
| - | - | - |
| [**Ticket created**](#ticket-triggers) | A new ticket comes in | Yes |
| [**Customer replied**](#ticket-triggers) | A customer adds a message to a ticket | Yes |
| [**New message**](#ticket-triggers) | Anyone adds a message or internal note to a ticket | Yes |
| [**Status changed**](#status-changed) | A ticket moves to a new status. Optionally, only to the statuses you pick | Yes |
| [**Priority changed**](#ticket-triggers) | A ticket's priority changes | Yes |
| [**Ticket updated**](#ticket-updated) | Any tracked field on a ticket changes | Yes |
| [**Decimal replied**](#decimal-replied) | Decimal writes a reply or internal note on a ticket | Yes |
| [**SLA at risk**](#sla-at-risk-and-sla-breached) | A ticket's SLA target is close to its due time | Yes |
| [**SLA breached**](#sla-at-risk-and-sla-breached) | A ticket's SLA target passes its due time | Yes |
| [**Slack message**](#slack-message) | Someone posts in a Slack channel Decimal is in | Yes |
| [**Schedule**](#schedule) | On a recurring schedule | No |
| [**Manual**](#manual) | Someone clicks **Run** | No |

Ticket triggers fire for tickets from every connected helpdesk, and for tickets in Decimal's own [Inbox](https://docs.decimal.app/support/overview.md).

## Ticket triggers

The agent receives the ticket's ID and the event: the message for **Customer replied** and **New message**, or the old and new value for **Status changed** and **Priority changed**. It reads the rest with its tools, so give it **Read tickets** for almost every ticket automation.

* **Customer replied** counts public messages from the ticket's requester or from another customer contact. Internal notes and teammate replies don't count.
* **New message** counts every message, including internal notes and teammate replies.
* Messages that Decimal writes never fire **Customer replied** or **New message**. Use [**Decimal replied**](#decimal-replied) for those.

### Status changed

Click **Any status** to pick the statuses you care about. The automation then runs only when a ticket moves *to* one of them, like **Closed** or **Waiting on engineering**. Leave it on **Any status** to run on every change.

### Ticket updated

Runs once for each change to a ticket, listing every field that changed. Fields watched:

* Status, priority, type, and title
* Assignee, requester, and team
* Tags and custom fields
* Linked issues and the ticket link
* Visibility and help center visibility
* Snooze time, resolution time, and latest message time

For status, priority, type, assignee, requester, team, and visibility, the event includes the old and new value. For the rest, it names the field and the agent reads the ticket to see the new value.

### Decimal replied

Runs after the [Support Agent](https://docs.decimal.app/agents/support-agent.md) writes a reply or internal note on a ticket. The event includes what it wrote and how it was routed, so an automation can act on the investigation: file an issue for a confirmed bug, flag a refund it recommended, or alert a team.

## SLA at risk and SLA breached

These appear when SLAs are turned on for your workspace. SLAs are in early access, and you set them up under **Settings → SLAs**.

* **SLA at risk** runs when an SLA target reaches its warning point, before it's due.
* **SLA breached** runs when the target passes its due time without being met.

Narrow either one with the two menus next to the trigger:

| Menu | Options |
| - | - |
| Target | **Any target**, **First response**, **Next response**, or **Resolution** |
| SLA | **Any SLA**, or one of your SLAs by name |

The event includes the ticket, the target, the SLA's name, and when it's due. Give the automation **Read tickets** to see the rest.

## Slack message

Runs when someone posts in a public or private channel that the Decimal app is a member of, including thread replies. It doesn't run on direct messages or on messages Decimal posts itself.

The agent receives the message text, the channel, the author, and whether it started a new thread. To read the rest of a thread or reply in it, add the **Read threads** and **Post messages** tools.

**Slack message** shows **Connect** until [Slack](https://docs.decimal.app/agents/slack.md) is connected. Most Slack automations start with a sentence like "Only act on messages in #customer-escalations" so they ignore other channels.

## Schedule

Runs on a recurring schedule, with no ticket attached. Set it with:

| Field | Options |
| - | - |
| **Frequency** | **Every hour**, **Every day**, **Weekdays**, **Every week**, or **Custom** |
| **Minute of each hour** | For **Every hour**: the minute past each hour |
| **Day** | For **Every week**: the day of the week |
| **Time** | For daily, weekday, and weekly schedules |
| **Timezone** | Defaults to your browser's timezone. Search to change it |

The summary under the fields shows exactly when it runs, like "Weekdays at 9:00 AM PT."

### Custom schedules

Choose **Custom** for anything else, then either:

* **Describe it**: type something like "Every hour on weekdays from 9am to 9pm" and click **Generate**. Decimal writes the cron expression for you.
* **Write cron**: enter a five-field cron expression, like `0 9-21 * * 1-5`.

Check the next runs listed under the expression before you save.

| Schedule | Cron |
| - | - |
| Weekdays at 9:00 AM | `0 9 * * 1-5` |
| Every Monday at 8:30 AM | `30 8 * * 1` |
| Every 15 minutes during business hours | `*/15 9-17 * * 1-5` |
| First day of each month at 7:00 AM | `0 7 1 * *` |
| End of each shift (6:00 PM) | `0 18 * * *` |

A scheduled automation doesn't know what happened since its last run unless you tell it. Say the window in the instructions, like "tickets created in the last 24 hours."

## Manual

Runs only when someone clicks **Run** on the automation. Use it for jobs you want on demand, like a weekly report you sometimes need early, or a cleanup you run after an incident. The automation has to be switched on before **Run** works. See [Test and run](https://docs.decimal.app/automations/test-and-run.md#run-a-manual-automation).

## Delays

Every trigger except **Schedule** and **Manual** can wait before running. Next to the trigger, choose **Immediately**, **After 5 min**, **After 15 min**, **After 30 min**, **After 1 hour**, **After 4 hours**, or **After 1 day**.

A delay is how you catch things that *didn't* happen: "One day after a ticket is created, if nobody has replied yet, raise its priority." When a delayed run starts, the agent is told time has passed and checks the ticket's current state before acting.

While it waits, the run shows as **Scheduled** in [Run history](https://docs.decimal.app/automations/run-history.md). If you switch the automation off before then, the run is skipped.

## Limits

* **One run per event.** If the same event reaches Decimal twice, the automation still runs once.
* **Rate-limited per ticket.** Each automation can only run so many times on the same ticket in a short window, so two automations can't keep triggering each other forever.
* **Only switched-on automations run.** Events that arrive while an automation is off are not replayed when you switch it back on.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.