# Email event rules and actions

Apply ordered email rules to route tickets, change their details and trigger follow-up when events or time conditions match.

*Release 3.3 · admin, operator, supervisor*

**Settings › Events › Email Events**

## What it is

**Email Events** apply rules to email tickets when something changes or enough time has passed. A rule can route work, change ticket details or send a notification. INSIDE checks rules in priority order and stops after the first rule that runs its actions.

## Who uses it and why

- Administrators with the **Settings** role and **Events** permission configure rules.
- Supervisors review routing and escalation behaviour. The **Manager** role exposes the screen, but saving and deleting need the **Settings** role with **Events** permission.
- Operators see the resulting assignments, ticket changes and notifications.

## Where to find it

Open **Settings › Events › Email Events**. Use the list to review rules and their **Enabled** state.

**Settings › Email › Automation** is a separate Powerfront-managed screen for standard ticket timers. Ask Powerfront to change those timers; use **Email Events** for the ordered rules described here.

## How it works

1. A selected event occurs. Choices under **Test for this Event** are **New Ticket Created**, **Ticket Closed**, **New Email**, **Status Changed** and **Time Based Trigger**.
2. INSIDE checks enabled rules with actions, starting at the lowest numbered **Priority**. Rules without a priority come last. Equal priorities use the rule's ID order.
3. The rule checks its cooldown and conditions. Conditions can combine alternatives and requirements, including ticket status, priority, subject, email account, message sender, assignee, source, tags, disposition and sentiment.
4. Time conditions can check elapsed time since a status change, assignment or the last non-system message.
5. The first qualifying rule runs its actions. Later rules are not evaluated for that event.

Standard actions include **Change Priority**, **Change Status**, **Transfer**, **Notify By Email**, **Set Disposition**, **Set Tags**, **Remove Tags**, **Email Autopilot**, **Mark as Spam** and **Add to Blacklist**. A transfer can assign work or push it to a queue.

## Configure it

Create a rule with a unique **Name** and **Description**. Enter **Cooldown**, optionally set **Priority**, and choose the events that should check it. Add at least one condition and one action, then save. Enable the rule after checking its configuration.

Put specific rules before broad catch-all rules. Include **Time Based Trigger** when using elapsed-time conditions. For **Email Autopilot**, configure the AI feature under **Settings › AI › Features** with the **Settings** or **Developer** role, then select it in the action.

Test both matching and non-matching tickets, including any pinned tickets and status transitions you depend on. Check **View Only** and the **Events** permission if saving is unavailable.

### Fields

| Field | Where | Required | What it is for |
|---|---|---|---|
| Name | Settings › Events › Email Events | Yes | Gives the rule a unique name within the displayed email event list. |
| Description | Settings › Events › Email Events | Yes | Describes the rule's purpose. |
| Cooldown | Settings › Events › Email Events | Yes | Sets the minimum interval in seconds between attempts by this rule for the same ticket. Zero applies no cooldown; the new editor leaves the value unset and requires a number before saving. |
| Priority | Settings › Events › Email Events | No | Sets evaluation order, with smaller numbers first. Accepts 1 to 999999999; unset priorities run after numbered priorities. |
| Test for this Event | Settings › Events › Email Events | Yes | Selects one or more ticket events that cause INSIDE to check the rule. |
| Actions | Settings › Events › Email Events | Yes | Defines what happens when the conditions match. At least one action is required and the editor rejects duplicate action types within a rule. |
| Enabled | Settings › Events › Email Events | No | Switches the saved rule on or off. A newly saved rule starts disabled until enabled. |

### Permissions

| Permission | Lets you |
|---|---|
| Settings | Access Email Events and save or delete rules when Events is permitted and View Only is off. |
| Events | Allows event configuration within the Settings role. |
| Manager | Access the Email Events screen. This role alone does not grant saving or deleting rules. |

## Limits and good to know

- These standard conversation rules apply to email tickets. They do not turn web chat or social messages into email tickets.
- Migrated conversations are excluded from this rule processing.
- A cooldown starts before the actions run. An unsuccessful action can still leave the rule cooling down.
- Timed rules remember relevant ticket timestamps to avoid repeating the same action on unchanged state. Expiry of a cooldown alone does not guarantee another timed action.
- Pinned tickets normally resist automatic transfer. A disabled or suspended assignee can allow routing to recover the ticket.
- The editor rejects duplicate action types within one rule and some contradictory combinations, including transfers tied to closed tickets. A new-ticket rule cannot change the new ticket directly to **Open** through this editor.
- A matching rule can prevent later rules from running even when one of its actions has nothing to change. Avoid overlapping rules that rely on every matching rule executing.

## Depends on and works with

### This feature uses

- **Requires** [Email ticket handling and statuses](CHN-026.md): Email Events operates on email tickets and their lifecycle events.
- **Configured in** [Email account and mailbox setup](CHN-024.md): Email account identity can filter rules and supply notification senders.
- **Configured in** [Taking and pinning conversations](CHAT-011.md): Pinned assignment protects eligible tickets against automatic transfer.
- **Configured in** [Dispositions](CHAT-019.md): Disposition definitions supply the classifications available to email rules.
- **Configured in** [Email templates and ticket notifications](CHN-028.md): Email templates and macros supply the content used by notification actions.
- **Configured in** [Ticket sources and email event automation](CHN-032.md): Ticket Source can restrict a rule to selected sources.
- **Configured in** [Email Autopilot for tickets](AI-012.md): The selected Email Autopilot feature defines the AI handling requested by the rule.
- **Configured in** [Departments](CHAT-006.md): Channel routing and availability settings determine eligible destinations for automatic transfers.
- **Configured in** [Teams](ADM-013.md): Team membership and team pinning settings affect automatic ticket transfers.
- **Works better with** [Incoming email and ticket replies](CHN-025.md): Incoming emails can trigger rules after INSIDE identifies their ticket.
- **Works better with** [Transferring conversations](CHAT-010.md): Transfer actions route matching tickets.
- **Works better with** [Chat queue](CHAT-005.md): A Transfer action can push a ticket to the queue.
- **Works better with** [Spam review and blocking](CHAT-020.md): Rules can mark spam or add a sender to the blacklist.
- **Works better with** [Sentiment and emotion](CHAT-022.md): Sentiment can be used in ticket conditions.
- **Works better with** [Tags and conversation data](CHAT-031.md): Tags can be conditions and can be added or removed by actions.
- **Works better with** [Custom scripts in email event rules](EXT-022.md): Developer extensions can add scripted event behaviour beyond the standard action choices.

### Used by

- **Configures** [Email Autopilot for tickets](AI-012.md): Email Events invoke the selected Email Autopilot feature.
- **Configures** [Ticket sources and email event automation](CHN-032.md): Email-event records define the triggers, conditions, priority, cooldown and actions that run on tickets.
- **Configures** [Integration script selection for automated actions](EXT-016.md): Email Events defines the triggers, priority and cooldown for rules with Powerfront-configured script actions.
- **Configures** [Custom scripts in email event rules](EXT-022.md): Email Events defines the triggers, conditions, priority and cooldown for custom script rules.

## FAQ and troubleshooting

**Why did my second matching rule not run?**

An earlier rule ran its actions. Adjust **Priority** or combine the required actions into one rule.

**Why did a timed rule run only once?**

INSIDE tracks the timestamp that satisfied the condition. Review whether the ticket's status, assignment or last-message time has changed, as well as the cooldown.

**Why did a matching ticket stay with its operator?**

Check whether it is pinned or protected by a pin-to-creator setting. Automatic transfers normally preserve that assignment.

**Why can I open Email Events but not save?**

Saving requires the **Settings** role with **Events** permitted and **View Only** off. The **Manager** role alone is insufficient.

**Why did Email Autopilot do nothing?**

Check that the rule ran and selects the intended Email Autopilot feature. That feature has its own eligibility and processing rules.
