> ## Documentation Index
> Fetch the complete documentation index at: https://sitegpt.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Collect leads from conversations

> Set up the lead form so the chatbot collects visitor contact details during a conversation.

Lead collection shows a lead form inside the chat. The visitor fills in the form, and SiteGPT saves the details as a lead. You choose the fields and when the form appears.

This page also covers **Pre-Chat User Details**, a separate form that shows before the conversation starts.

## Before you start

* **Plan:** any plan. See [Plans and limits](/docs/reference/plans-and-limits.md).
* **Role:** any team role can change lead settings. See [Team members](/docs/guides/account/team-members.md).
* If you use a booking tool, have your booking page URL ready.

## Turn on lead collection

**1. Open the lead settings**

In your chatbot's sidebar, select **Leads** > **Leads Settings**. The **Settings** tab opens.

**2. Turn on lead collection**

Turn on **Enable Lead Collection**.

**3. Choose the contact fields**

Under **Basic Contact Fields**, turn on **Name**, **Phone Number**, or both. **Email Address** is always collected. You cannot turn it off.

**4. Choose a template**

Under **Industry Template**, select a template for your business, or select **Custom**. See [Industry templates](#industry-templates).

**5. Choose when the form appears**

Under **Collection Triggers**, select one trigger. See [Choose a trigger](#choose-a-trigger).

**6. Save**

Select **Save Changes**.

## Choose a trigger

You can select only one trigger.

| Trigger | What happens |
| - | - |
| **When user shows interest (Recommended)** | The AI shows the form when the visitor shows real interest, for example when they ask about pricing. |
| **When unable to answer** | The AI shows the form when it needs more details about the visitor's situation to give a good answer. |
| **After N messages (static form)** | The form shows after the visitor's Nth message. Type N in the box in this option. N is a number from 1 to 20. The default is 1. The AI does not decide. |

With the two AI triggers, the AI asks for the details with the form, not in a chat message. The AI is told to show the form only one time per conversation.

The **After N messages** form does not show if the visitor already gave their details, for example in the pre-chat form.

### Lead forms on WhatsApp

On WhatsApp, the lead form is a WhatsApp form with the same fields. After the visitor sends the form, the chatbot confirms, and sends your booking link if you set one. WhatsApp shows forms only for verified Meta businesses. When your business is verified, all three triggers work. Until then, the AI asks for the details in a plain message, and the **After N messages** trigger sends nothing. See [WhatsApp lead form](/docs/integrations/whatsapp.md#lead-form).

### Add trigger keywords

When you select the **Custom** template, you can add keywords. The AI then tries to collect details when a visitor mentions one of them.

1. Under **Custom Trigger Keywords**, enter words in **Keywords (Optional)**. Separate the words with commas, for example `pricing, demo, quote`.
2. Select **Save Changes**.

Keywords are not used with the **After N messages** trigger.

## Industry templates

A template sets preset form fields and topic keywords for one type of business. The templates are:

* Dental Clinic
* HVAC Services
* Legal Services
* Real Estate
* Automotive
* Healthcare
* SaaS/Software
* E-commerce
* Consulting
* Custom (no preset fields)

When you select a template other than **Custom**, the page shows a preview of its fields. All templates except **E-commerce** include booking. For those templates you must enter a **Booking System URL**.

To change the fields of a template, select **Custom**. The current fields stay, and you can edit them.

## Add custom fields

Custom fields are available when the template is **Custom**.

**1. Add a field**

Under **Custom Form Fields**, select **Add Field**.

**2. Set the label**

In **Display Label**, enter the text that the visitor sees, for example `Budget Range`.

**3. Set the field name**

In **Field Name**, enter an internal name, for example `budget_range`. SiteGPT uses this name in exports and webhooks.

**4. Choose the field type**

In **Field Type**, select **Text**, **Email**, **Phone**, **Text Area**, or **Select Dropdown**. For **Select Dropdown**, enter each option on a new line in **Dropdown Options**.

**5. Set the other options**

Turn on **Required field** if the visitor must fill in the field. In **Placeholder Text**, enter a hint that shows inside the field.

**6. Save**

Select **Save Changes**.

> [!WARNING]
>
> Do not use `message` or `reason` as a field name. These names are reserved. If you use one, SiteGPT shows an error when you save. Each field name must also be unique.

SiteGPT also saves the page the visitor was on as `page_url`. You do not need a field for it.

## Add a booking link

A booking link lets visitors book a time with you from the chat. The AI includes the link when it collects the lead. On WhatsApp, the chatbot sends the booking link as a message after the visitor sends the lead form.

* With an industry template that includes booking, enter your link in **Booking System URL**. This field is required.
* With the **Custom** template, turn on **Enable booking integration**, then enter your link in **Booking System URL**.

Select **Save Changes** when you finish.

## Hand the conversation to your team after a lead

Turn on **Auto-escalate on lead capture** to send the conversation to a human after the visitor submits the form. To set up human support, see [Set up human support](/docs/guides/human-support/set-up-human-support.md).

With this setting off, a submitted form alone does not escalate the conversation. The AI thanks the visitor and continues to help. If human support is on and the visitor asked for a person before the form, the AI can still escalate, as at any other time.

## Ask for details before the chat starts

**Pre-Chat User Details** is a separate form. It shows before the conversation starts. It works independently of AI lead collection. The **Name** and **Phone Number** toggles under **Basic Contact Fields** choose which fields it shows. You can change these toggles only while **Enable Lead Collection** is on.

1. On the **Settings** tab, go to **Pre-Chat User Details**.
2. Select one option:
   * **Required**: visitors must enter their details before they can start the conversation.
   * **Optional**: the form shows before the conversation, but visitors can skip it.
   * **Off**: no pre-chat form. The AI or an escalation can still collect details.
3. Select **Save Changes**.

## Change the text on the lead form

To change the form heading, the button text, or the confirmation message, go to **Language & Region** and edit the **Lead Form** section. See [Change the widget language and text](/docs/guides/widget/language-and-text.md).

> [!NOTE]
>
> On HIPAA workspaces, industry templates are not available. Conversations are redacted after 7 days, but lead records stay until you delete them. See [HIPAA](/docs/account/hipaa.md).

## Check that it works

1. Open your chatbot on your website or in the dashboard preview.
2. Start a conversation that matches your trigger. For example, ask about pricing if you use **When user shows interest (Recommended)**.
3. Fill in the form and submit it.

The chat shows a confirmation that the details were saved. The new lead shows in **Leads** > **Leads Dashboard**. To work with your leads, see [Manage leads](/docs/guides/leads/manage-leads.md). To send leads to email or other tools, see [Send leads to other tools](/docs/guides/leads/send-leads-to-other-tools.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.