# Pre-chat Survey

The **Pre-chat Survey** is used to collect user information before they start a chat session with a customer service agent. Typically, it consists of several questions presented to the user before the chat begins. Questions may include the user’s name, email, and other relevant data. The purpose of the pre-chat survey is to gather information that can be used to personalize customer service and improve overall user engagement.

**Input Types:**

* **text** – Used to collect short text from visitors, e.g., first name, last name.
* **textarea** – Used to collect longer text from visitors, e.g., descriptions, comments.
* **email** – Used to collect the visitor’s email address.
* **number** – Used to collect numerical data, e.g., mobile numbers, ID numbers, or codes.

{% columns %}
{% column %}

<figure><img src="/files/8O7PVTK8LOYTXuUMDsb3" alt=""><figcaption></figcaption></figure>
{% endcolumn %}

{% column %}

<figure><img src="/files/DyRJL88L6Hm4XDIWOFyp" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

* **Display** – This field must be enabled for the visitor to enter data.
* **Required** – Activating this checkbox makes the field mandatory, meaning the visitor cannot start the chat without filling it in.
* **Delete** – Use with caution, as the field and its associated data will be deleted. It is important not to delete a field if you have already started collecting real user data, as this will result in data loss.

You can add multiple fields and show or hide them based on the information you want to collect from visitors.

{% columns %}
{% column %}

<figure><img src="/files/tblMapLnw24TEnyu06WW" alt=""><figcaption></figcaption></figure>
{% endcolumn %}

{% column %}

<figure><img src="/files/1fnTP2OjPQtLD1b0CpRK" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}


---

# Agent Instructions: 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:

```
GET https://docs.livecaller.io/livecaller/widget-management/pre-chat-survey.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
