Chat Widget8 min read

How to Capture Leads from Your Chat Widget with Pre-Chat Forms and AI Detection

Capture visitor contact information through pre-chat forms, automatic AI detection during conversations, agent manual capture, and custom fields. Manage leads from the dashboard and export to CSV for your CRM.

SupportHQ Team·

Every visitor who chats with your AI agent is a potential lead. SupportHQ captures contact information through multiple channels — a pre-chat form, AI-powered detection during conversations, agent manual capture, and automated workflows. This guide covers how to configure lead capture and manage your leads.

How Leads Are Captured

Leads can come from four sources, each labeled in your Leads dashboard:

SourceHow It Works
Pre-Chat Form Visitor fills out a form before the chat starts. You control which fields appear.
AI Capture The AI automatically detects when a visitor mentions their email, name, or phone during conversation and saves it — no form needed.
Agent Form An agent clicks "Capture Lead" in a live conversation and fills in the visitor's info manually.
Manual Someone on your team adds a lead directly from the Leads page.

Additionally, leads are automatically created when a visitor requests a live agent and none are available (the agent unavailable fallback).

Configuring the Pre-Chat Form

Navigate to Settings → Lead Form to configure what visitors see before they start chatting.

Enabling the Pre-Chat Form

Toggle the Pre-Chat Form switch to enable it. When enabled, visitors must fill out the form before the chat opens. When disabled, they go straight to the chat — leads are still captured by the AI or agents, just not upfront.

Form Header

  • Title — the heading visitors see (default: "Get in touch")
  • Description — subtext below the title (default: "Please fill in your details to start a conversation")

Default Fields

Five built-in fields come pre-configured. You can't delete them, but you can customize each one:

FieldTypeRequiredVisible
EmailTextAlwaysAlways
NameTextNoYes
PhoneTextNoNo (hidden by default)
CompanyTextNoNo (hidden by default)
MessageTextareaNoYes

For each field, you can:

  • Toggle visibility — show or hide the field (email is always visible)
  • Rename the label — change "Company" to "Organization" or "Phone" to "WhatsApp Number"
  • Change the type — switch between Text, Textarea, or Dropdown
  • Set required/optional — email is always required; all others are your choice
  • Reorder — use the up/down buttons to change the field order in the form

Adding Custom Fields

Click Add Custom Field to create your own fields. Custom fields support the same options as default fields — label, type, required, visible — plus you can delete them if they're no longer needed.

Examples of useful custom fields:

  • Department (Dropdown) — "Sales", "Support", "Billing" — route inquiries before the chat starts
  • How did you find us? (Dropdown) — "Google", "Social Media", "Referral", "Other"
  • Order Number (Text) — for e-commerce support, get the order ID upfront
  • Company Size (Dropdown) — "1-10", "11-50", "51-200", "200+" — qualify leads before they chat

For Dropdown fields, enter the options as a comma-separated list (e.g., "Sales, Support, Billing").

Custom field values are stored in the lead's metadata and appear as columns in the Leads dashboard.

Where the Form Appears

The pre-chat form is shown in three places:

  • Chat widget — visitors see it when they open the chat bubble, before the conversation starts
  • Agent lead capture — agents see the same fields (with pre-populated data) when they click "Capture Lead" in a conversation
  • Leads page "Add Lead" — the manual lead creation modal uses the same field configuration

This means your custom fields flow through everywhere — configure once, capture consistently.

AI-Powered Lead Capture

Even without the pre-chat form, the AI automatically captures contact information. When a visitor mentions their email address, name, phone number, or company during conversation, the AI detects it and saves a lead in the background — without interrupting the chat flow or showing a form.

This works because the AI has a built-in capture_lead tool that activates when it recognizes contact information naturally shared in conversation.

The Leads Dashboard

Navigate to Leads in the sidebar to see all captured leads.

Lead List

The table shows:

  • Contact — name, email, and phone
  • Company — if provided
  • Message — the lead's initial message or note (truncated)
  • Custom fields — any visible custom field columns
  • Source — a colored badge (Pre-Chat Form, AI Captured, Agent Form, Manual)
  • Date — when the lead was captured

Filtering by Source

Use the tab buttons at the top to filter leads by source. Each tab shows its count:

  • All — every lead
  • Pre-Chat Form — leads from the widget form
  • AI Captured — leads detected by the AI during chat
  • Agent Form — leads captured manually by agents in conversations
  • Manual — leads added directly from the Leads page

Adding a Lead Manually

Click Add Lead to open the creation modal. The form shows the same fields you've configured in Lead Form settings. Email is always required.

Exporting to CSV

Click Export CSV to download all your leads as a spreadsheet. The CSV includes: Email, Name, Phone, Company, Message, any visible custom fields, Source, and Date. Use this to import leads into your CRM, email marketing tool, or spreadsheet.

Lead Capture in AI Procedures

The Create Lead internal action in AI Procedures can capture leads as part of an automated workflow. For example, a lead qualification procedure can collect name, email, and company size through conversation, then create a lead automatically — all without human intervention.

Tips

  • Enable pre-chat for high-intent pages — on pricing or demo pages, a pre-chat form captures the lead before the conversation even starts. On general pages, consider leaving it off so visitors can chat freely (the AI will capture their info naturally).
  • Keep forms short — email + name is usually enough upfront. The more fields you require, the fewer visitors will fill out the form.
  • Use dropdowns for structured data — "Department" or "Company Size" as dropdowns give you clean, filterable data instead of free-text answers.
  • Let the AI do the work — even without a pre-chat form, the AI captures contact info automatically. Many teams find AI capture + a minimal form is the best balance.
  • Export regularly — if you use a CRM, export leads weekly and import them. Or use the Zapier integration to automate it.
  • Review source distribution — the source tabs tell you where your leads come from. If most are "AI Captured", your pre-chat form might not be needed. If most are "Pre-Chat Form", your AI is working well as a support tool.
  • Custom fields are global — the fields you configure in Lead Form settings are used everywhere: widget pre-chat form, agent capture in conversations, and the manual "Add Lead" modal.
Tags:lead capture chat widgetpre-chat form setupai lead detectionchatbot lead generationcustom lead form fieldsexport leads to CSV CRM