For the complete documentation index, see llms.txt. This page is also available as Markdown.
Cortex XSOAR6.12EoLCortex XSOAR 6.x

Post Processing for Incidents

Configure incident post-processing in Cortex XSOAR 6.12.

After you remediate an incident, you may want to perform additional actions on the incident, such as closing a ticket in a ticketing system or sending out an email. You can create a post-processing script to cover these scenarios.

Note

If a post-processing script returns an error, the incident does not close.

Arguments Available in a Post-Processing Script

These arguments are available for use in a post-processing script:

  • closed - The incident closed time.

  • status

  • openDuration

  • closeNotes

  • closingUserId - The username of the user who closed the incident, or DBot if the incident was closed by DBot (for example, through a playbook).

  • closeReason

  • Any other field values passed in at closure, whether through the incident close form, the CLI, or a playbook task.

Create a Post-Processing Script

This procedure describes how to create a post-processing script after an incident has been remedied.

  1. Select Automation → New Automation.

  2. Type a name for the post-processing script and click Save.

  3. In the Tags field, from the dropdown list select Post-processing.

  4. Add fields as required.

  5. Click Save.

The following script example requires the user to verify all To Do tasks before closing an incident. Before you start, you need to configure and enable a Cortex XSOAR REST API instance.

In this example, we create post processing script for Service Now incidents using a SNOW instance, where there are required fields to resolve and close (such as Resolution Code, Resolution Notes, etc.).

This script works with the defaults from Service Now and resolves and closes the mirrored ticket in Service Now.

Note

If there is an additional custom argument defined for a post-processing script, the arguments closeNotes, closeReason, closed, openDuration, etc. are not available in the demisto.args() dictionary. In this case, there are two options:

  1. Remove the additional custom argument from Script settings and instead add it as a field on the Close Form for the incident type. This results in the additional argument being passed to the post-processing script.

  2. Manually add the default system arguments of closeNotes, closeReason, closed, openDuration, etc. to the Script settings, in addition to the custom argument. If not added, the code example above close_notes = demisto.args().get('closeNotes','No close notes provided') always returns "No close notes provided".

Add a Post-Processing Script to the Incident Type

Before you start you need to Create a Post-Processing Script. After you add a post-processing script to the incident type, all incident types will use the post-processing script.

  1. Go to Settings → OBJECTS SETUP → Incidents → Types .

  2. Select the incident type you want to add the post processing script.

  3. Click Edit.

  4. In the Post process using field, from the dropdown list, select the script.

    post-process.png
  5. Click Save.

Last updated

Was this helpful?