> 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.10/configure-cortex-xsoar/incident-configuration/use-post-processing-scripts-in-an-incident.md).

# Use post-processing scripts in an incident

Post-processing scripts perform actions on an incident after it is remediated but before it is closed by an analyst or automatically in a script or playbook. For example, after remediating an incident, an analyst may want to perform additional actions on the incident, such as closing a ticket in a ticketing system, sending an email, or preventing an incident from being closed without an assigned owner. You can create a post-processing script to cover these scenarios.

The following content packs include post-processing scripts:

* Common Scripts: Includes the `GenerateInvestigationSummaryReport` script, which generates a report when an investigation is closed.
* Case Management - Generic: Includes the `CloseLinkedIncidentsPostProcessing`, which closes any linked incidents when the incident is closed.

You can search for post-processing scripts on the **Scripts** page by using the **Tags** filter and typing `post-processing`.

You need to create a post-process script and then add the script to the incident type.

Example 11.&#x20;

For an example of creating post-processing scripts that prevent an incident from being closed without an assigned user or the close notes not being filed out correctly, together with a Service Now example, see the following video: [Post Processing Scripts](https://www.youtube.com/watch?v=jmlO1zikXao).


---

# 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.10/configure-cortex-xsoar/incident-configuration/use-post-processing-scripts-in-an-incident.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.
