> 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/xsoar-6-administrator-guide/6.14/customize-cortex-xsoar/customize-and-configure-cortex-xsoar/incidents/pre-process-rules/create-pre-process-rules-for-incidents.md).

# Create Pre-Process Rules for Incidents

Create Cortex XSOAR 6.14 pre-process rules for incidents.

Pre-processing rules enable you to perform certain actions on incidents as they are ingested into Cortex XSOAR. You can, for example, link an incoming incident to an existing incident, or under certain conditions, drop the incoming incident altogether.

{% hint style="info" %}

### Note

Rules are applied in descending order, and only one rule is applied per incident.
{% endhint %}

1. Select Settings → OBJECTS SETUP → **Incidents** → Pre-Process Rules → **New Rule**.
2. In the **Rule Name** field, type a name for the rule.

   Give a meaningful name that helps you identify what the rule does. This will be useful when viewing the list of rules.
3. If you want the rule to apply to a specific incident, in the **Conditions for Incoming incident** section, click **Add filter** and set the incident field and value.

   For example, if you are running a phishing awareness campaign, you can create a rule for the email subject.

   You can add multiple conditions within a filter and add multiple filters. For more information about filters, see [Filter Operators](/xsoar-6-administrator-guide/6.14/customize-cortex-xsoar/customize-and-configure-cortex-xsoar/playbooks/filters-and-transformers.md#UUID-3e99fa07-8af3-15bb-6f28-08f294320a8b).
4. In the **Action** section, from the drop-down list determine which action to take if the incoming incident matches the rule.
5. Depending on the Action field, complete section **3.**

   For example, in the **Action** field, if you select **Drop and update**, in section **3**, complete the **Update** field.

   Section 3 enables you to link to an incoming event and update the incident depending on the selected filter. For information about the **Action** section and the fields in section **3**, see [Rule Actions for Pre-Process Rules](/xsoar-6-administrator-guide/6.14/customize-cortex-xsoar/customize-and-configure-cortex-xsoar/incidents/pre-process-rules/create-pre-process-rules-for-incidents/rule-actions-for-pre-process-rules.md).
6. (Multi-tenant) From the dropdown list, select the [propagation label](/cortex-xsoar-6-multi-tenant-guides/6.14/configure-multi-tenant/manage-content/add-propagation-labels-to-content.md). When syncing from the main account to the tenant, the pre-processing rule is sent to the tenant based on the propagation label.
7. (Optional) In a remote repository or in a multi-tenant environment, you can view the relevant dependencies to ensure that all necessary dependencies are propagated or pushed to the remote repository.
8. (Optional) To check that the rules are effective and efficient, click **Test**.

   Testing is useful to check that you are receiving the desired results before putting a rule into production. We recommend you fetch data from an existing incident as a sample incident against which the rule can run. You can also manually enter JSON to use as a test sample or edit the JSON from an existing incident using the **Edit** button.
9. Click **Save**.

<details>

<summary>Pre-process rules examples</summary>

Drop incidents

When you run a phishing awareness campaign and send training emails to your employees, you want your employees to report the emails but you don't want to investigate. In this example, we create a condition for incoming incidents with the email subject You've Won the Best Employee Award, and drop those incidents without linking them to another incident.

![preProcessing.png](https://3548014557-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOHlpKeFtqCLUYKuYyccd%2Fuploads%2Fgit-blob-89bfdacc40c27f3bb729ee0d294e9d2c743ce2aa%2F0d4786bf767e85942c1e1f27993484f84e8b10c779b7dec8367ad62a10acd717.png?alt=media)

Drop and update incidents

In this example, you want a pre-process rule to do the following:

* Apply to incidents that are ingested from the Sample Incident Generator.
* Drop incoming events and update the incident, if the name of the existing incident is identical to the incoming incident.

  You can add multiple conditionals to check for duplicates (not just the incident name) such as a Threat ID, incident ID, email, and host.

1. Create a pre-process rule.

   ![pre-process-rule-6.png](https://3548014557-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOHlpKeFtqCLUYKuYyccd%2Fuploads%2Fgit-blob-2139101b393c2fc49726ec4b189f5308806ff836%2Fb83ce70975127f0e52a27c2332abd2b0b702fb637b253c97551d875d33569f1f.png?alt=media)
2. (Optional) Go to an incident and check the Context Data.

   You can see that 43,222 duplicate incidents have been dropped, as seen in the original incident.

   ![pre-process-context-6.png](https://3548014557-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOHlpKeFtqCLUYKuYyccd%2Fuploads%2Fgit-blob-85d0e9076538ff947a49f215cebca844c32cf35d%2F459acd29fba0d670b0f63b81f6223989b0182854bca2096c1c2379379761bf09.png?alt=media)

   In the incident table, you can also see the number of dropped incidents.

   ![pre-process-table.png](https://3548014557-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOHlpKeFtqCLUYKuYyccd%2Fuploads%2Fgit-blob-208f34bfe48225d25cdf8c5d8163c4e77740c4c1%2F5638fcb9406b006a4f4b35d5d90096cf1ca65a03401bae6b9d44193e5c5f409a.png?alt=media)

   In the dashboard:

   ![pre-process-dash.png](https://3548014557-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOHlpKeFtqCLUYKuYyccd%2Fuploads%2Fgit-blob-f1c41989ae104fc724eebd10c2bb279b6a320138%2F08261232cb29eda8019c0f139769b34b0db8a8167ba5ddec3261e103bde1ef85.png?alt=media)

</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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cortex-docs.paloaltonetworks.com/xsoar-6-administrator-guide/6.14/customize-cortex-xsoar/customize-and-configure-cortex-xsoar/incidents/pre-process-rules/create-pre-process-rules-for-incidents.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
