> 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-xsiam/configure-cortex-xsiam/customize-cases-and-issues/customize-case-fields-and-layouts/case-fields/update-case-fields.md).

# Update case fields

Update Cortex XSIAM case fields with CLI commands, scripts, and playbooks to automate case data and investigation workflows.

Update Cortex XSIAM case fields when an issue changes. Use CLI commands, scripts, or playbooks to automate case data updates during an investigation. For example, you can change a case name, star a case, or update its status.

You can update the following case fields through a playbook, script, or command:

* manual\_severity
* starred
* assigned\_user\_email
* status
* score
* incident\_name
* description

Use the following methods to update case fields with the CLI, a script, or a playbook.

<details>

<summary>Update case fields with the Cortex XSIAM CLI</summary>

Run the `!setParentIncidentFields` command in the issue or case War Room.

When you start typing the CLI provides the available options. If you select an enum field the CLI provides the available values.

Examples

* To change the name of the case to `Malware`, run

  ```
  !setParentIncidentFields incident_name=Malware
  ```
* To change the name of the case to `Malware` and star the case, run

  ```
  !setParentIncidentFields incident_name=Malware starred=true
  ```

</details>

<details>

<summary>Update case fields with a script</summary>

When a script runs in an issue, its data is added to the issue context data and issue fields. To update case fields, add `setParentIncidentFields` to the `demisto.executeCommand` function in a JSON file.

Example

To update the case status to `resolved`, run

```
demisto.executeCommand("setParentIncidentFields", {"status":"resolved_other"})
```

Ensure that you have the required RBAC permission to write scripts.

</details>

<details>

<summary>Update case fields with a playbook</summary>

When a playbook runs, data is added to issue context data and issue fields by default. Configure playbook tasks to also add data to case context data and case fields.

The following example explains how to add tasks to a playbook that update the case fields to star a case, and add the key starred: true to the case context data.

Add the following tasks to a new or existing playbook.

1. Create a Conditional task to check whether the parent incident fields are starred using the ${parentIncidentFields.starred} key.
2. Create a standard task using the setParentIncidentFields script to update the starred field.
3. Create a standard task to print the value to the War Room.
4. Run the playbook.\
   In the case context data, you can see the key starred: true. If running in an issue or a case, after refreshing the case, the case is now starred.

</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/cortex-xsiam/configure-cortex-xsiam/customize-cases-and-issues/customize-case-fields-and-layouts/case-fields/update-case-fields.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.
