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

# Find and Merge Duplicate Tickets

> Flag duplicate tickets for a technician with a Workflow, or merge them automatically with an Agent

Two templates handle duplicates, and they stop at different points. **Duplicate Ticket Finder** is a Workflow that suggests a merge in an internal note and changes nothing else. **Ticket Merger** is an Agent that merges true duplicates into the oldest ticket. Start with the finder. Move to the merger when the finder's suggestions are right for your tickets.

## Pick one

| | Duplicate Ticket Finder | Ticket Merger |
| - | - | - |
| Type | Workflow | Agent |
| Runs on | Every new ticket that passes its filter | Every new ticket that passes its filter |
| Candidates | Open tickets for the same contact, created in the last 61 days, up to 20 | Open tickets for the same company, created in about the last 7 days |
| What it writes | An internal note that names the suggested ticket, only when it finds one | The merge, and an internal note on the ticket that stays open |
| When it is not sure | Suggests a merge only when both tickets report the same issue and finishing one finishes both | Does not merge, and names the related ticket in the internal note |
| PSAs | Autotask, ConnectWise, Halo, ServiceNow, Syncro | Autotask, ConnectWise, Halo. ServiceNow: see the warning below |

Merging works on ConnectWise, Autotask, Halo and ServiceNow. Each PSA merges differently: ConnectWise and Halo use their own merge, Autotask has none so Neo copies the notes and closes the source ticket, and ServiceNow marks the incident as a duplicate of the other ([Merge Tickets](https://docs.neoagent.io/agents/tools/management/merge-tickets.md#which-psas)). Syncro, Accelo and Zendesk cannot merge, so on Syncro use the finder and merge by hand.

## Flag duplicates: Duplicate Ticket Finder

**1. Start from the template**

Open the [**Duplicate Ticket Finder** template](https://dashboard.neoagent.io/create?templateId=13). It triggers on **Ticket Created**, runs **Find Ticket to merge with** and adds the result with **Add Ticket Note**, with **Type of note to add** set to **Internal Note**.

**2. Limit it to the right tickets**

On the **Schedule/Select** step, **Filter Tickets** is empty, so the Workflow runs on every new ticket. Add rules for the boards or ticket types where duplicates arrive, such as your service desk board. Leave out alert boards if each alert is its own event.

**3. Set the candidate search**

On the **Action** step, open **Find Ticket to merge with** under **1. Smart Actions**:

* **Search criteria for potential merge candidates**: **Open tickets for same contact** finds a user who sends the same request twice. **Open tickets for same company** also finds several people who report one problem.
* **Number of days to look back for potential merge candidates**: 61 in the template. A shorter window gives fewer wrong suggestions.
* **Number of potential merge candidates to consider**: 20 in the template, 40 at most.
* **Ticket statuses to exclude from the candidate search**: add your statuses that mean the work is finished but that your PSA still counts as open. On Autotask, that is any status you created, such as Resolved.
* **Use custom instructions**: say which of your tickets are never duplicates of each other.

Keep **Allow Neo to close Ticket A if the given Ticket B states that the issue was resolved** off. The action's full settings: [Find Ticket to merge with](https://docs.neoagent.io/building-automations/actions/ai/find-ticket-to-merge-with.md).

**4. Save and read the notes**

Click **Save & Enable**. For the first weeks, read the notes on new tickets and the runs on [**Activity**](https://dashboard.neoagent.io/executions). Count how often a suggested ticket is a true duplicate.

To make this Workflow merge, add **Merge Ticket** under **2. Update in PSA**. It merges the ticket into the one **Find Ticket to merge with** picked ([Merge Ticket](https://docs.neoagent.io/building-automations/actions/write-to-psa/merge-ticket.md)). Add it only after the notes show that the suggestions are right.

## Merge duplicates: Ticket Merger

**1. Start from the template**

Open the [**Ticket Merger** template](https://dashboard.neoagent.io/agents/create?templateId=51). It runs on **Ticket Created**. It looks for open tickets of the same company from about the last 7 days, merges a true duplicate into the oldest ticket, and adds an internal note on that ticket that says what it merged and why. It changes no status, assigns nobody and sends nothing to the client.

**2. Add a filter**

On **Triggers & Filters**, **Filter Tickets** is empty, so the agent reads every new ticket. Add rules for the boards or companies you want deduplicated.

**3. Edit the never-merge list**

On **Tools & Settings**, under **Custom Instructions**, the template tells the agent never to merge:

* tickets with Critical status or priority
* security threat or alert tickets
* backup-failure and monitoring tickets, because each can be a separate failure
* onboarding and termination tickets, unless both are for the same person
* tickets with "Copy" in the subject
* completed or closed tickets
* tickets classified as a Change or a Request

"Copy" in the subject and the Change or Request classification are conventions of the MSP that wrote the template. Change them to yours, and add the ticket types that must never merge in your service desk. Change "roughly the last 7 days" if your duplicates arrive further apart.

**4. Choose how the first merges run**

As shipped, the agent merges without asking anyone, on every ticket in scope. Turn on one of these before you enable it:

| Setting | Where | What happens |
| - | - | - |
| **Test Mode** | **Overview** | Nothing changes in the PSA. Each run reports the merges it would make. Under **Report test results via**, pick **Dashboard message** to keep the reports off your tickets. |
| **Supervised Mode** | **Overview** | The agent shows its plan, then asks a technician before each merge and each note. |
| **Approval** on the PSA **Tickets** group | **Tools & Settings**, under **PSA** | The agent asks a technician before each merge, and writes its notes without asking. Use this after the supervised runs, to keep a technician on every merge. |

**Supervised Mode** and **Approval** need an approver. Under **Approvals**, turn on **Request Technician-in-the-Loop Approval** and pick people under **Technicians-in-the-loop who can approve actions**, or a channel under **Teams or Slack channels & chats that can approve** ([Technician-in-the-Loop](https://docs.neoagent.io/core/technician-in-the-loop.md)).

Turn the mode off only when its runs show merges you agree with. [Supervised mode](https://docs.neoagent.io/core/supervised-mode.md) compares the two modes.

![Agent Overview tab with Supervised Mode switched on](https://mintcdn.com/neoagent/u95ne_lKoQa74zsB/images/recipes/agent-supervised-mode.webp?fit=max\&auto=format\&n=u95ne_lKoQa74zsB\&q=85\&s=2b9649072880644b8b5497ebede8dce2)

**5. Check the PSA permissions**

Under **PSA** on **Tools & Settings**, **Tickets** must be at **Write** with **Merge** on. That gives the agent the [Merge Tickets](https://docs.neoagent.io/agents/tools/management/merge-tickets.md) tool. On ConnectWise the template also turns on **Bundle**. Turn it off if you want merges only.

![Ticket Merger PSA permissions: Ticket Notes rows at Write, and Tickets at Write with Merge and Bundle on and Approval on](https://mintcdn.com/neoagent/Ay3PPakIrk7J4Ca5/images/recipes/ticket-merger-permissions.webp?fit=max\&auto=format\&n=Ay3PPakIrk7J4Ca5\&q=85\&s=074f020929c1a00d6797c6c88390d19b)

**6. Enable it and read the runs**

Click **Save & Enable**. Read each run on [**Activity**](https://dashboard.neoagent.io/executions) and the note on each ticket that stays open. When a merge is wrong, change the never-merge list or the filter before the next run.

> [!WARNING]
>
> On ServiceNow, the template sets **Tickets**, **Work Notes**, **Client-Facing Notes** and **Time Entries** to **Read**, so the agent can neither merge nor write its note. To use it there, set **Tickets** to **Write** with **Merge** on, and **Work Notes** to **Write**. A ServiceNow merge works on incidents only.


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