> 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.12/configure-cortex-xsoar/customize-and-configure-cortex-xsoar/playbooks/playbook-task-fields/create-a-conditional-task.md).

# Create a Conditional Task

Conditional tasks are used for determining different paths for your playbook. You can use conditional tasks for something simple like proceeding if a certain integration exists, or whether a user account has an email address.

Alternatively, you can use conditional tasks for more complex situations. For example, if an indicator was enriched and the verdict was set to malicious, escalate the incident for managerial approval. However, if the indicator reputation is unknown or benign, proceed down a different route.

If the playbook was installed from a content pack, duplicate or detach the playbook, before creating a conditional task.

1. In a playbook, click **+** (Create task).
2. Select the **Conditional** option.
3. In the **Task Name** field, type a meaningful name for the task that corresponds to the data you are collecting.
4. Select the required option based on the conditional task.

   | Option            | Description                                                                                                                                                                                                                                                                                          |
   | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
   | Built-in          | Creates a logical statement using an entity from within the playbook. For example, in an access investigation playbook, you can determine that if the Asset ID of the person whose account was being accessed exists in a VIP list, set the incident severity to High. Otherwise, proceed as normal. |
   | Manual            | Creates a conditional task which must be manually resolved. For example, in an access incident investigation, you might ask the user if they attempted to access their account. A manual task checks if the user responded.                                                                          |
   | Ask               | Creates an Ask Task, the answer to which determines how a playbook proceeds.                                                                                                                                                                                                                         |
   | Choose automation | Creates a conditional task based on the result of a script. For example, check if an IP address is internal or external using the **`IsIPInRanges`** automation. When using an automation, the Inputs and Outputs are defined by the automation script.                                              |
5. Complete the task configuration in the remaining tabs. Some configurations are required, and some are optional.
6. Click **Save**.


---

# 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.12/configure-cortex-xsoar/customize-and-configure-cortex-xsoar/playbooks/playbook-task-fields/create-a-conditional-task.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.
