> 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.13/learn-about-cortex-xsoar/customize-and-configure-cortex-xsoar/playbooks/playbook-task-fields/communication-tasks/create-a-data-collection-task.md).

# Create a Data Collection Task

The Data Collection task is a multi-question survey (form), which recipients access from a link in the message. The survey resides on an external site that does not require authentication, thereby allowing survey recipients to respond without restriction.

You can include the following types of questions in the survey:

* Standalone questions. These are presented to users directly in the message, and from which users answer directly in the message (not an external survey).
* Field-based questions. These are based on a specific Cortex XSOAR field (either system or custom), for example, a Grid field. The response (data) received for these fields automatically populates the field for this incident in Cortex XSOAR. For single select field based questions, the **use first as default** definition is taken from the field’s matching attribute.

You can collect responses in custom fields, for example, a Grid field.

{% hint style="info" %}

### Note

If responses are received from multiple users, data for multi-select fields and grid fields are aggregated. For all other field types, the most recent received response will override previous responses as it displays in the field. All responses are always viewable in the context data.
{% endhint %}

If the playbook was installed from a Content Pack, duplicate or detach the playbook, before creating a data collection task.

In order to add the generated links to the Context Data, add the **`comm.datacollection.linktocontext.enabled`** [server configuration](/xsoar-6-administrator-guide/6.13/learn-about-cortex-xsoar/reference/server-configurations/modify-server-configurations.md) set to **`true`**. The links will be added under **Ask.Links** in the Context Data.

1. In a playbook, click **+** (Create task).

   ![playbook-create\_task2.png](/files/5s1UFZD2oLWa9YJi4P8a)
2. Select the **Data Collection** option.

   ![playbook-data-collection.png](/files/3uhOpcXYOi0fd3G3odqr)
3. Enter a meaningful name in the Task Name field for the task that corresponds to the data you are collecting.

   ![playbook-task\_name.png](/files/cHoWkysVufo33owsXWjF)
4. In the **Ask by** field, select how the message or survey will appear to users and how the message or survey will be sent.

   * If you select **Email**, enter the subject and message of the email and the email addresses of the users who should receive this message or survey.
   * If you do not select email, this will be a task. Enter the task message.

   The survey does not appear in the message. A link to the survey is automatically placed at the bottom of the message. This link is also accessible from the Incident's Context Data, accessible from the ellipses menu in the Incident page.

   ![playbook-comm-channel.png](/files/tjifTwHtCBA0JmLI9dqX)
5. Enter the questions and answer types that the survey will contain.

   You create questions in the survey and can drag-and-drop questions to rearrange the order in which they display in the survey.

   ![playbook-questions.png](/files/gtmO1FN23mMhkzJ4sivd)
6. (Optional) To customize the look and feel of your email message, click **Preview**.

   You can determine the color scheme and how text in the message header and body appear, as well as the appearance and text of the button the user clicks to submit the survey.

   ![playbook-preview.png](/files/BJmoQQ5ViuPGTpK2YTuT)


---

# 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.13/learn-about-cortex-xsoar/customize-and-configure-cortex-xsoar/playbooks/playbook-task-fields/communication-tasks/create-a-data-collection-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.
