# Collecting Contact Information

Your chatbots can be used to collect sales leads. You can enable your chatbot to collect the name and email of every user before they can start a conversation.

For EU customers, Wonderchat is compliant with the GDPR. You can read more about our privacy policy here: **↗** [**Wonderchat's Privacy Policy**](https://wonderchat.io/privacy-policy)

Here's how to enable sales leads collection:

***

## Step 1: Go to Chatbots > Actions (⋮) > "Edit Chatbot"

<figure><img src="/files/eZlCDLkfnc4TQtgcYIUd" alt=""><figcaption></figcaption></figure>

## Step 2: Navigate under "Lead Collection" tab

<figure><img src="/files/zhGOBKVMibJTkccJQloj" alt=""><figcaption><p>Go under <strong>"Lead Collection"</strong> tab</p></figcaption></figure>

## Step 3: Set your Lead Collection Settings

<figure><img src="/files/zOtAUDRgqCkdj5TJkVbs" alt=""><figcaption><p>Set and fill in your Lead Collection Settings</p></figcaption></figure>

### Lead Collection Settings

The **Lead Collection Settings** allow you to gather personal information from users to qualify chats and capture lead details such as their name, email, and phone number. These fields can be mandatory or optional, depending on your preferences. You can also customize the fields to suit your needs.

1. **Required Collection Button**:\
   Toggle this option to specify whether lead information (like name, email, or phone number) is mandatory during the chat interaction. If required, chat users must submit their information before being allowed to continue chatting with your chatbot.
2. **Collect Leads After \[X] Messages**:\
   This setting allows you to specify when the chatbot will start collecting lead information. You can set it to trigger after a certain number of user messages (e.g., after the user sends two messages).
3. **Collect Email, Name, Mobile**:
   * Enable the toggles to collect the user's **email**, **name**, or **mobile number** during the chat.
   * You can customize the message that asks the user for each piece of information. For example, “Please provide your email so we can follow up with you.”
4. **Add Custom Field**:\
   If you need to collect additional information not included by default, click **Add Custom Field** to create your own data collection fields.

{% hint style="info" %}
Leads collection is **optional by default** (i.e. not ‘required)

* It is not mandatory for a user to fill up the chatbot information with their names and emails. Users who refuse to fill in their name and emails can still chat with your chatbot without filling in the information.
* The **required** switch should be on only if you want to make it mandatory for users to fill up the leads collection fields before proceeding to chat with your bot.
  {% endhint %}

By enabling the lead collection settings, your chatbot will show the “name”, “email” and/or “phone number” field in the chat widget as part of the conversation with the user.

<figure><img src="/files/19Qu9bYv39OJUoCCf4EG" alt=""><figcaption><p>Example of Name and Email Fields in the Chat Widget</p></figcaption></figure>

## Step 4: Find names, phone numbers and emails of the users reflected in the chatlogs

<figure><img src="/files/zC0HKfiXxjF2bOoh8q1a" alt=""><figcaption><p>Sample of customer details in chatlogs</p></figcaption></figure>

From the chatlogs, you can access the contact details of the customers as long as they have provided their details in the name, email and/or phone number fields in the chat widget (example shown earlier).

***

If you have any more questions, feel free to reach out to us at <mark style="color:purple;">**<support@wonderchat.io>**</mark>


---

# 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.wonderchat.io/setup-guides/collecting-leads-with-your-chatbot/how-to-collect-user-names-emails-and-phone-numbers-from-users.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.
