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

# Update case fields

Update Cortex AgentiX case fields with CLI commands, scripts, and playbooks.

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.

### Update Cortex AgentiX case fields from the CLI

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

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

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

### Update Cortex AgentiX case fields with a script

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

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

{% hint style="info" %}

### Note

Ensure that you have the required RBAC permission to write scripts.
{% endhint %}

### Update Cortex AgentiX case fields with a playbook

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.

1. 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.

      ![parent-incident-task.png](https://404732257-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FocwvgxtzkvBHMLbPsZuG%2Fuploads%2Fgit-blob-c1c0952d6163bf54baf3013367284cf24c741d10%2F39dfedbbed9cd4e7f8955fa4b80151eb7d386ab2a248d2bc81397738910456c3.png?alt=media)
   2. Create a standard task using the `setParentIncidentFields` script to update the **starred** field.

      ![parent-incident-task2.png](https://404732257-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FocwvgxtzkvBHMLbPsZuG%2Fuploads%2Fgit-blob-e14f20edfe8d418df7b25833cc0da8cf1e61ffbf%2Fa7b027e57dafb55ce7d41d9a280544aee8dcbd0c755973b7f9732c78aba7c23a.png?alt=media)
   3. Create a standard task to print the value to the **War Room**.

      ![parent-incident-task3.png](https://404732257-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FocwvgxtzkvBHMLbPsZuG%2Fuploads%2Fgit-blob-81d141aecfa18cf307fd8ebf2960a231fe4b8e7f%2F5c3be7a0721f0f06fdece0f5bc16474e9c8cc024b51f44f3959ebe40024b5b7d.png?alt=media)
2. 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.


---

# 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-agentix/configure-cortex-agentix/cases-and-issues-configuration/customize-case-fields-and-layouts/case-fields/create-custom-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.
