> 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

Sometimes you need to update case fields based on a change in an issue. For example, after starting an investigation an analyst might want to change the name of a case, star a case, or change the status of a case.

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

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

The following sections explain how to update case fields by running a command in the CLI, and running a script, and running a playbook.

<details>

<summary>Use the 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>Use a script</summary>

When a script runs in an issue, the data from the script is added to the issue context data and the issue fields. If you want to update case fields, in a Json file, add the `setParentIncidentFields` to the `demisto.executeCommand` function.

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>Use a playbook</summary>

When running a playbook, by default the data is added to the issue context data and issue fields. You can additionally add this data to case context data and case fields by configuring tasks in a playbook.

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