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

# Close tickets automatically

> Close tickets that need no action, such as a "Thank you" reply, with a procedure and a case trigger

Some tickets need no work from your team: a customer replies "Thank you", confirms the fix worked, or an out-of-office message comes in. IrisAgent can recognize these tickets and close them for you.

You set up two things:

1. A **procedure** that recognizes the ticket and gives it a Topic.
2. A **case trigger** that closes tickets with that Topic.

**Before you start:** connect Zendesk, Freshdesk, or Salesforce. Other helpdesks do not support changing the ticket status from a trigger.

## Step 1: Recognize tickets that need no action

1. Go to **Automate → Procedures** on the [IrisAgent dashboard](https://web.irisagent.com/automation/categories) and click **Create New Procedure / Q\&A**.

2. Name it `No action needed`.

3. Under **Scenario**, describe the tickets to close and the ones to leave open. For example:

   ```text theme={null}
   The customer's latest message needs no reply or follow-up. They are only saying thank you, confirming the issue is fixed, or sending an automatic reply. Do not use this if the message also asks a question, reports a problem, or requests anything.
   ```

4. Under **Action**, choose **Direct Answer** and enter a short reply, such as "Glad we could help!" The procedure can also answer matching conversations on the channels you select under **Availability**.

5. Click **Enable tagging** and turn on **Create a Topic in IrisAgent**.

6. Enter a **Topic group** used only by this procedure, such as `Reply intent`.

7. Turn on **Include ticket comments**, so IrisAgent reads the public replies and not only the first message.

8. Click **Apply**, set **Status** to **Enabled**, and save.

> [!TIP]
>
> Procedures in the same Topic group share the **Include ticket comments** setting. A separate group keeps your other Topics unchanged.

## Step 2: Test before closing anything

Start with a trigger that only adds a tag, so you can check which tickets would be closed.

1. Go to **Automate → Case Triggers** on the [IrisAgent dashboard](https://web.irisagent.com/triggers) and click **Create New Trigger**.
2. Add the **Topics** condition and select `No action needed`.
3. Add the **Write custom tags to case** action and enter a tag, such as `no-action-needed`.
4. Name the trigger and click **Add New Trigger**.

Review the tagged tickets for a few days. If a ticket should have stayed open, make the procedure's **Scenario** more specific.

## Step 3: Close the tickets

1. Open the trigger you created.

2. Add the **Change case status** action and choose the status to set:

   | Helpdesk | Status to choose |
   | - | - |
   | Zendesk | **Solved** |
   | Freshdesk | **Resolved** or **Closed** |
   | Salesforce | Your closed status, such as **Closed** |

3. Save the trigger.

The **Trigger Activity** panel shows how many tickets had their status updated.

> [!WARNING]
>
> Changing the status can start automations in your helpdesk, such as satisfaction surveys. Check them before you turn this on.

## What to expect

* **Recent tickets only.** Case triggers run on recently created tickets. A customer who replies "Thank you" to an older ticket reopens it, and the trigger does not close it.
* **Once per ticket.** A trigger changes a ticket's status one time. If the customer reopens the ticket after that, it stays open for your team.
* **Not instant.** IrisAgent reads the new reply and updates the Topic before the trigger runs, so the ticket can stay open for a while first.

## Troubleshooting

> [accordion] A ticket was not closed
>
> Check that the ticket has the `No action needed` Topic. If it does not, add similar messages to the procedure as training examples. If it does, check that the ticket was created recently and that the trigger has not already run on it.

> [accordion] A ticket was closed by mistake
>
> Reopen it in your helpdesk. The trigger will not close it again. Then add that kind of message to the "Do not use this if" part of the **Scenario**.

## Related

* [Case Triggers](https://docs.irisagent.com/deploying-irisagent/Tickets.md)
* [AI ticket tagging](https://docs.irisagent.com/configuring-ai-and-automation/Ticket-Tagging.md)
* [Workflows](https://docs.irisagent.com/configuring-ai-and-automation/Workflows.md)

Need help? [Email us](mailto:contact@irisagent.com).


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