> For the complete documentation index, see [llms.txt](https://docs.wonderchat.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wonderchat.io/setup-guides/collecting-leads-with-your-chatbot/how-to-collect-user-names-emails-and-phone-numbers-from-users.md). Agents can also search and read this documentation through its [MCP server](https://docs.wonderchat.io/~gitbook/mcp).

# Collecting Contact Information

A Guide on How to Collect User Names, Emails, and Phone Numbers From Users.

Your agent can ask visitors for their name, email and phone number during the chat, so your team can follow up.

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

***

## Step 1: Open the Leads tab

1. Go to **Agents** and click **Edit** on your agent's card.
2. In the settings sidebar, open **Leads** (in the **Engagement** group).

<figure><img src="https://3760420285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0WUvfmkdMPXz3x7NXP8i%2Fuploads%2Fgit-blob-a1bc3bd83b30be6f978c3f9288a258cca3c773df%2Flead-collection-settings.png?alt=media" alt="The Leads tab with the Lead Collection and Lead Fields sections"><figcaption><p>The Leads tab</p></figcaption></figure>

***

## Step 2: Choose what to collect, and when

In the **Lead Collection** section:

1. Click **Add Field** and pick **Name**, **Email** or **Phone**. Add as many as you need. Drag them to change the order they're asked in.
2. Set the rule at the top: **After a user has sent \[X] messages, collect these fields \[after / before] the bot replies, in order**.
   * Choose **before** to collect the details before the agent answers the visitor's message, or **after** to answer first.
3. Turn on **Is collection mandatory?** if visitors must give their details before they can keep chatting. Leave it off to let visitors skip the questions and keep chatting.

{% hint style="info" %}
Lead collection is optional by default. Only turn on **Is collection mandatory?** if you want to require the details before visitors can continue.
{% endhint %}

***

## Step 3: Set up each lead field

In the **Lead Fields** section, each field has a **Message** (the question the agent asks) and some **Options**.

| Field             | Message example                                | Options                                                                                                                                                                                                                                                                                         |
| ----------------- | ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Email**         | "What's the best email to follow up with you?" | **Work email only**: rejects personal addresses such as Gmail or Yahoo. **Verify**: the visitor enters a 6-digit code sent to their email before the lead is saved.                                                                                                                             |
| **Name**          | "May I have your name?"                        | **Full name only**: only accepts a full name (first and last).                                                                                                                                                                                                                                  |
| **Mobile Number** | "What number can we reach you on?"             | **Country code**: shows a dial-code dropdown that picks the visitor's country from their location. You can limit it to certain countries. **Verify**: the visitor enters a 6-digit code sent by SMS. **TCPA consent**: shows your consent text by the phone field and records proof of consent. |

{% hint style="info" %}
**Verify** (email and phone) and **TCPA consent** are available on the **Scale** plan and above.
{% endhint %}

### Custom fields

To ask for anything else, such as company name, team size or a preferred meeting time, click **Add custom field** under the lead fields. Custom fields are available on the **Scale** plan and above. See [Custom lead fields and appointment booking](https://docs.wonderchat.io/setup-guides/collecting-leads-with-your-chatbot/custom-lead-fields-and-appointment-booking.md).

### Lead collected message

Turn on **Lead collected message** to have the agent send a message once the visitor has given all their details, for example "Thanks, our team will be in touch."

Click **Save** when you're done.

***

## Advanced lead collection

{% hint style="info" %}
Advanced triggers are available on the **Scale** plan and above.
{% endhint %}

In **Advanced Lead Collection Settings**, click **Add Trigger** to ask for details only in certain situations. Each trigger has two parts:

* **If this happens**: **Message count reaches** a number, **User says** a keyword or phrase, or a **Custom prompt** describing the situation for the AI.
* **Then collect leads**: the fields to ask for, and whether collection is mandatory.

For example, ask for an email only when a visitor asks about pricing.

To ask for details as part of a longer flow, such as booking a demo, use a [workflow](https://docs.wonderchat.io/setup-guides/adding-chatbot-workflows/set-up-chatbot-workflows.md) instead.

***

## AI lead scoring

{% hint style="info" %}
AI lead scoring is available on the **Scale** plan and above.
{% endhint %}

Turn on **Score leads with AI** in the **AI Lead Scoring** section to rate each lead hot, warm or cold. Describe **What makes a lead hot?** and **What makes a lead warm?**. Anyone who is neither is treated as cold.

You can then send hot leads somewhere different from the rest in the **Notifications** tab, or route them in a workflow with the **Score this lead** step.

***

## Step 4: See the leads you collect

Details visitors share are saved on the conversation. Open **Chatlogs** from the left sidebar to see them with each chat.

To get an alert for every new lead, see [Turning on email notifications for every new lead collected](https://docs.wonderchat.io/setup-guides/collecting-leads-with-your-chatbot/turning-on-email-notifications-for-every-new-lead-collected.md).

***

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