> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/cortex-xsoar-8-on-prem/8.7/investigate-and-respond-to-threats/incidents-and-indicators-investigation/investigate-an-incident/link-incidents.md).

# Link incidents

When ingesting incidents, you may find that several incidents have similar or identical information. You have the following options:

* Set up automatic deduplication. Your administrator can set up pre-process rules or scripts in a playbook. For more information, see [Incident deduplication in Cortex XSOAR](/cortex-xsoar-8-on-prem/8.7/configure-cortex-xsoar/incident-configuration/incident-deduplication-in-cortex-xsoar.md).
* From the incidents table, mark the incident as duplicate. You select which incident to keep and which to close.
* From the Incident, in the **LINKED INCIDENTS** section, add linked incidents. These incidents are linked but not closed.
* In the CLI you can use the `!linkIncidents` command to deduplicate, and link/unlink incidents

When you link an incident without closing, you can view all similar incidents together without closing them as duplicates. When you link an incident you can see them all in one table and take action altogether, such as running commands or closing the incidents.

If you find during your investigation you want to unlink incidents, run the `!linkedIncidents` command in the CLI.

<details>

<summary>Link incidents in the incident layout</summary>

Before you start, note the incident ID you want to link.

1. In the **Case Info** tab, scroll to the **LINKED INCIDENTS** section.
2. Click the **+** icon.
3. Add the incident IDs you want to link, separated by a comma.
4. Click Submit.

   The linked incident appears in the **War Room** and the **LINKED INCIDENTS** section.
5. (Optional) To take action or view all linked incidents, go to the Linked Incidents table by clicking ![linked-incident-add.png](/files/hYW4MCOpkXDhVY6J2P1r) in the **LINKED INCIDENTS** section.

{% hint style="info" %}

### Note

To unlink the incident, run the following command in the CLI:

`!linkIncidents linkedIncidentIDs=``<id>`` action=``<unlink>`
{% endhint %}

</details>

<details>

<summary>Link incidents using the CLI</summary>

1. In the CLI, run the following command:

   `!LinkIncidents linkedIncidentIDs=``<id>`` action=``<action value>`

   The linked incident appears in the **LINKED INCIDENTS** section and the **War Room**.
2. (Optional) To take action or view all linked incidents, go to the Linked Incidents table by clicking ![linked-incident-add.png](/files/hYW4MCOpkXDhVY6J2P1r) in the **LINKED INCIDENTS** section.

To unlink the incident, run the following command:

`!linkIncidents linkedIncidentIDs=``<id>`` action=``<unlink>`

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/cortex-xsoar-8-on-prem/8.7/investigate-and-respond-to-threats/incidents-and-indicators-investigation/investigate-an-incident/link-incidents.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
