> 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/xsoar-6-administrator-guide/6.14/onboard-cortex-xsoar/users-and-roles/roles-in-cortex-xsoar/pre-set-query-per-role.md).

# Pre-set Query per Role

Choose a pre-set query for each role and supported component.

When users access a component, Cortex XSOAR runs their role’s pre-set query. New users receive this query by default. Existing users can select their own default query.

### Supported components

* Incidents
* Indicators
* Jobs
* War Room

Create and save the query on its component page. Then select it while creating or editing the role.

A pre-set query is available from **Saved queries**. It includes `(Pre-set)` in its name. Users cannot delete it.

If a user has multiple roles, Cortex XSOAR shows multiple pre-set queries. It uses the highest nested role first. Otherwise, it uses alphabetical order.

If a user’s role changes, Cortex XSOAR automatically updates their pre-set role query.

When you edit or create roles, the available queries are based on the role’s editing permissions as follows.

| Page       | Page Access or Role Permissions |
| ---------- | ------------------------------- |
| Incidents  | Incidents                       |
| Indicators | Indicators                      |
| Jobs       | Jobs                            |
| War Room   | Investigation > data > read     |

When you edit a role, the list of queries is re-populated with your own saved queries. If you change the pre-set query for a role, the query will be added to the users’ queries, but not as the pre-set query. However, if you delete one of your own queries after you configure a role, the role’s list of queries is not affected.

When you remove a role’s pre-set query, if a query exists for that role, it will automatically become the pre-set query for the role.

Users can view the pre-set query based on their role when clicking Saved queries. The pre-set role query will have (Pre-set) appended to the name of the query. Although users can change their default query, they cannot delete the pre-set role query. If a user has multiple roles, the user will see multiple queries. The pre-set role query will be the highest nested one or the first one that appears alphabetically.

If a user’s role changes, the user’s pre-set role query is automatically updated.

Users can create and save queries for a component page and select any one of the saved queries to be their default query.

<br>


---

# 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/xsoar-6-administrator-guide/6.14/onboard-cortex-xsoar/users-and-roles/roles-in-cortex-xsoar/pre-set-query-per-role.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.
