> 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.13/configure-cortex-xsoar/incident-configuration/incident-customization/create-an-incident-field.md).

# Create an incident field

Incident fields are used to accept or populate incident data coming from incidents. These fields are added to incident layouts and are mapped using classification and mapping.

Creating incident fields is an ongoing process. You can create fields from information ingested from third-party integrations. As you learn more about your needs and the capabilities of your third-party integrations, you can continually add new fields to capture the most relevant information.

When investigating an incident, an analyst can easily add relevant information to the fields in the layout. Incident fields can be populated by incident team members during an investigation at the beginning of the investigation or before closing the investigation.

{% hint style="info" %}

#### Note

In the CLI, you can set and update all system incident fields using the **`setIncident`** command, of which each field is a command argument.
{% endhint %}

<details>

<summary>Field types</summary>

You can create the following field types:

| Field Type           | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Attachments          | Enables the user to add an attachment, such as .doc, malicious files, reports, and incident images.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| Boolean              | Checkbox                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| Date picker          | Adds the date to the field.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| Grid (table)         | <p>Include an interactive, editable grid as a field type for selected incident types or all incident types. To see how to create a grid field and to use a script, see <a href="/spaces/vksWgzvBZ9ZvAg4dGLrH/pages/rtsh8SanqLTcWwCFnRoJ">Incident field trigger scripts</a>.</p><p>When you select Grid (table) you can format the table and determine if the user can add rows.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| HTML                 | <p>Create and view HTML content, which can be used in any incident type.</p><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p><strong>Note</strong></p><p>The following HTML tags are not permitted: <code>blockquote</code>, <code>del</code>, <code>dd</code>, <code>div</code>, <code>dl</code>, <code>dt</code>, <code>fieldset</code>, <code>form</code>, <code>h1</code>, <code>h2</code>, <code>h3</code>, <code>h4</code>, <code>h5</code>, <code>h6</code>, <code>hr</code>, <code>iframe</code>, <code>ins</code>, <code>li</code>, <code>math</code>, <code>noscript</code>, <code>ol</code>, <code>pre</code>, <code>p</code>, <code>script</code>, <code>style</code>, <code>table</code>, <code>ul</code>, <code>address</code>, <code>article</code>, <code>aside</code>, <code>canvas</code>, <code>details</code>, <code>dialog</code>, <code>figcaption</code>, <code>figure</code>, <code>footer</code>, <code>header</code>, <code>hgroup</code>, <code>main</code>, <code>nav</code>, <code>output</code>, <code>progress</code>, <code>section</code>, <code>video</code>.</p><p>The following CSS tags are not permitted: <code>background-color</code>, <code>text-align</code>, <code>font-size</code>, <code>font-family</code>, <code>font-weight</code>, <code>color</code>, <code>line-height</code>, <code>border-style</code>, <code>border</code>, <code>page-break-inside</code>, <code>tablelayout</code>, <code>padding</code>, <code>background-size</code>, <code>display</code>, <code>padding-top</code>, <code>padding-right</code>, <code>padding-bottom</code>, <code>padding-left</code>, <code>text-size-adjust</code>, <code>break-inside</code>, <code>word-break</code>, <code>width</code>, <code>height</code>, <code>-ms-text-size-adjust</code>, <code>-webkit-text-size-adjust</code>.</p></div> |
| Long text            | <ul><li>Long text is analyzed and tokenized, and entries are indexed as individual words, enabling you to perform advanced searches and use wildcards.</li><li>Long text fields can't be sorted and used in graphical dashboard widgets.</li><li>While editing a long text field, pressing Enter will create a new line (case is insensitive).</li></ul><p>Add a placeholder, if required.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| Markdown             | Add markdown-formatted text as a **Template** that will be displayed to users in the field after the indicator has been created. Markdown lets you add basic formatting to text to provide a better end-user experience.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| Multi select / Array | <p>Select the following options:</p><ul><li>Multi-select from a (static) pre-filled list.</li><li>An empty array field for the user to add one or more values as a comma-separated list.</li></ul><p>Add a placeholder, if required.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| Number               | Can contain any number. Default is 0.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| Role                 | Role assigned to the incident. Determines which users (by role) can view the incident.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| Short Text           | <ul><li>Short text is treated as a single unit of text and is not indexed by word. Advanced search, including wildcards, is not supported.</li><li>Short text fields are case-sensitive by default, but can be changed to case-insensitive when creating the field.</li><li>While editing a short text field, pressing Enter will save and close.</li><li>Maximum length 60,000 characters.</li><li>Recommended use is one-word entries. Examples: username, email address, etc.</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| Single select        | Select a value from a list of options. Add comma-separated values.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| Tags                 | <p>Accepts a single tag or a comma-separated list, not case-sensitive.</p><p>Add a placeholder, if required.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| Timer/SLA            | <p>View how much time is left before an SLA becomes past due, as well as configure actions to take if the SLA does pass.</p><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p><strong>Note</strong></p><p>Incidents sorted using an SLA/Timer field are sorted by the due date of the SLA field.</p></div>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| URL                  | Add a URL when completing the field.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| User                 | A user in Cortex XSOAR.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |

{% hint style="info" %}

#### Note

Cortex XSOAR has a limit of 1000 incident fields, including system fields, fields you create manually, and any incident fields in installed content packs.
{% endhint %}

</details>

<details>

<summary>How to create a field</summary>

1. Select Settings & Info → Settings → Object Setup → Incidents → Incident Fields → **New Field**.

   To edit an existing incident field, right-click the field name and select **Edit**.
2. Select the relevant field type.
3. Add the following information:

   | Parameter  | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
   | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
   | Mandatory  | If selected, this field is mandatory when used in a form.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
   | Field Name | <p>A meaningful display name for the field. After you type a name, you will see below the field that the <strong>Machine name</strong> is automatically populated. The field’s machine name is applicable for searching and the CLI.</p><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p><strong>Note</strong></p><p>If you try to create a new incident field with a name that already exists in the system, such as <strong><code>Account</code></strong>, you may receive a message like this:</p><p><code>\[Could not create incidentfield with ID '' and name 'Account'.Field already exists as a builtin field (100709)].</code></p><p>If so, select a different name as the incident field is already reserved for system use.</p></div><p>You should not create a custom field named <strong><code>reason</code></strong> as it is a saved keyword in the tenant.</p> |
   | Tooltip    | An optional tooltip for the field.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
4. In the **Basic Settings** tab, define the values according to the selected field type.

   | Parameter   | Description                                                                                                                                                                                        |
   | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
   | Placeholder | Optional text to display in the field when it is empty. This text will appear in the layout, but not in the created incident. Available for Short text, Long text, Multi-select / Array, and Tags. |
   | Values      | A comma-separated list of values that are valid for the field.                                                                                                                                     |
5. If selecting a TImer/SLA field, define the following:

   | Parameter         | Description                                                                                                                                                                                                                                                                                                                                                                            |
   | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
   | SLA               | Determine the amount of time this item needs to be resolved. If no value is entered, the field serves as a counter.                                                                                                                                                                                                                                                                    |
   | Risk Threshold    | Determine the point in time at which an item is considered at risk of not meeting the SLA. By default, the threshold is 3 days, which is defined in the global system parameter.                                                                                                                                                                                                       |
   | Run on SLA Breach | <p>In the Run on SLA Breach field, select the script to run when the SLA time has passed. For example, email the supervisor or change the assignee.</p><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p><strong>Note</strong></p><p>Only scripts to which you have added the SLA tag appear in the list of scripts that you can select.</p></div> |
6. If you are creating a Grid (table) field, in the **Grid** tab, define the following values.
   * To enable users to add/remove rows in the grid, select the **User can add rows** field. If selected, the user can add rows but not columns.
   * Manage rows and columns. You can move the columns and add/delete rows and columns (using the + and - signs). How you design the grid determines how it appears to users.
   * Configure each column by clicking the settings button in each column. Add the column name, select whether the column is mandatory, and the field type. If you select **Lock**, the value for that field is static (not editable). If you do not select the Lock checkbox (default), users can perform inline editing.
7. In the **Attributes** tab, define the following:

   | Field                                                             | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
   | ----------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
   | Script to run when field value changes                            | <p>The script dynamically changes the field value when script conditions are met. For a script to be available, it must have the <strong><code>field-change-triggered-indicator</code></strong> tag when defining the script.</p><p>For more information, see <a href="#UUID-812e90cf-e865-aeb2-0529-4e97fc18ea1d">Incident field trigger scripts</a>.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
   | Run the field triggered script after the new field value is saved | <p>When configuring a field trigger script, you have the following options:</p><ul><li><p>Unchecked (recommended for incident modification)</p><p>Leave unchecked for the script to execute before the incident is stored in the database. This enables the script to modify the incident field values using commands like <code>!setIncident</code> or other functions, such as <code>demisto.set.</code> Useful in most cases, including performing validations and starting and stopping Timer/SLA fields.</p></li><li><p>Checked</p><p>The script executes after the incident is stored in the database. This mode is intended for actions that use the new field value but do not change the incident itself (such as logging data to an external service).</p></li></ul><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p><strong>Note</strong></p><p>If you check <strong>Run the field triggered script after the new field value is saved</strong>:</p><ul><li><p>Inability to modify an incident</p><p>The script cannot modify any incident field, including the field that triggered the script or any other custom field.</p></li><li><p>setIncident</p><p>Any attempt within the script to use <code>demisto.executeCommand("setIncident"</code>) (for example, to update a custom field with a new value) does not update the context data. The War Room may incorrectly show an entry suggesting the field value was changed.</p></li></ul></div> |
   | Field display script                                              | Determines which fields display in forms, as well as the values that are available for single-select and multi-select fields. For more information, see Create Dynamic Fields in Incident Forms.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
   | Add to all incident types                                         | Determines for which incident types this field is available. By default, fields are available to all incident types. To change this, clear the Add to all Incident types checkbox and select the specific incident types to which the field is applicable. For example, you may want to limit the field to Access, Malware, and Network incident types.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
   | Default display on                                                | <p>Determines at which point the field is available.</p><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p><strong>Note</strong></p><p>This attribute affects when the field is available for edit. When <strong>New/Edit</strong> is selected, the field can be set using <code>setIncident</code> only. When <strong>Close</strong> is selected, it can be set using the <code>closeInvestigation</code> command. When <strong>Both</strong> is selected, it is available to be set using both <code>setIncident</code> and <code>closeInvestigation</code>.</p></div>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
   | Edit Permissions                                                  | Determines whether only the owner of the incident can edit this field.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
   | Indexing Make data available for search                           | <p>Determines if the values in these fields are available when searching.</p><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p><strong>Note</strong></p><p>In most cases, Cortex XSOAR recommends selecting this checkbox so that values in the field are available for indexing and querying. However, in some cases, to avoid adverse effects on performance, you should clear this checkbox. For example, if you are ingesting an email to an email body field, we recommend that you not index the field.</p></div>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
8. Save the field.

   If you subsequently edit the field, you can select **Don't show in the incidents layout**. If selected, the incident field does not appear in the layout, but the data is displayed in the context data.
9. Add the field to an incident layout.
10. (Optional) In the incident type, map the incident field, so the incident field is automatically updated, without the analyst having to change it.

</details>

<details>

<summary>Incident field examples</summary>

The following section shows several examples of common fields used in real-life incidents.

**False positive**

Below is an example of a mandatory False Positive field, which will be completed when the incident is closed. The Field can have a value `Yes` or `No`. The Administrator can query or run a report based on this field. After this field is added, all incidents need to complete this field before an incident can be marked closed.

![new-incident-field-basic.png](/spaces/HUXm4cXMLNi17K8Nk5FM/files/cLqfsUKDWL5hK7xugjEJ)

![new-incident-field-attributes.png](/spaces/HUXm4cXMLNi17K8Nk5FM/files/J1Yxq2vO5jAhT7R2PgEZ)

**SLA fields**

The following SLA field can be used to trigger a notification when the status affecting the SLA of an incident changes. In this example, if the SLA is breached an email is sent to the owner's supervisor.

![sla-field.png](/spaces/HUXm4cXMLNi17K8Nk5FM/files/JTBId1HjYfsddAwxJh3X)

</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-xsoar-8-on-prem/8.13/configure-cortex-xsoar/incident-configuration/incident-customization/create-an-incident-field.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.
