DocumentationToolsLead Capture

Lead Capture

Automatically capture, qualify, and organize leads from conversations.

Lead Capture turns your AI agent into a passive lead generation engine. As visitors chat with your agent, it naturally collects contact details, silently infers their intent from the conversation, and stores any custom data fields you define. All captured leads appear in the Leads tab of your agent dashboard, ready to view in detail or export as CSV.

No forms. No pop-ups. Just a conversation.

What Gets Captured

Every lead stores the following:

Built-in fields — always available, no setup required:

  • Email — configurable as required or optional
  • Name — configurable as required or optional
  • Phone — configurable as required or optional
  • Intent — automatic; inferred from the conversation (see Intent Detection)
  • Location — automatic; approximate city, region, and country from the chat session

Custom fields — defined by you, per agent. Add any structured data the agent should collect from the conversation: party size, reservation date, budget, property type, dietary requirements — anything your follow-up workflow needs. See Custom Fields.

When to Use Lead Capture

Use this when you want to:

  • Collect inbound leads from your website without a separate form
  • Qualify visitors automatically based on what they discuss
  • Capture structured, domain-specific data alongside contact details
  • Follow up with prospects after conversations end

Enabling Lead Capture

Step 1 — Enable the tool

Go to your agent’s Tools tab and enable the Lead Capture tool.

Step 2 — Configure contact fields

Once enabled, a Lead Capture Fields section appears. Choose which built-in contact details your agent collects:

  • Email — toggle on/off; mark as required or optional
  • Name — toggle on/off; mark as required or optional
  • Phone — toggle on/off; mark as required or optional
⚠️

At least one of email or phone must be set to required. An optional-only contact field means the agent can save a lead with no way to follow up. The form will not save until this invariant is met.

Fields marked required are what the agent will insist on before closing the lead. Fields marked optional are collected naturally if the visitor volunteers them, but the agent will not block on them.

Custom Fields

Custom fields let you capture structured, domain-specific data alongside the built-in contact fields. The agent collects these from the conversation exactly as it collects email or phone — by extracting what the visitor says, not by showing a form.

Adding a custom field

Under the Custom Fields section (visible when Lead Capture is enabled), click Add field. Fill in:

  • Label — the human-readable name for the field (e.g. Party Size, Reservation Date). Max 60 characters.
  • Type — the data type (see Field types below).
  • Description — a hint for the AI explaining what to extract (e.g. Number of guests in the party, including the reservation holder). Max 200 characters. Recommended — a precise description meaningfully increases the likelihood the AI correctly identifies and extracts the value from the conversation. If omitted, the label is used as the hint.
  • Required — whether the agent must collect this field before saving the lead.

The key (the internal identifier stored in the database) is derived automatically from the label. For example, Party Size becomes partySize. You can see the derived key displayed below the label field as you type. Keys are always server-normalized — what you type is never stored directly.

Field types

TypeWhat it storesExample values
TextAny string"main dining room", "vegetarian"
NumberA numeric value4, 2.5
Yes / NoA booleantrue, false
DateA date string in YYYY-MM-DD format"2026-06-15"
Date & TimeAn ISO 8601 date-time string"2026-06-15T19:30"

Why type matters. The type tells the AI what format to extract — a Number field won’t accept free text, a Date & Time field expects a specific date and time. It also controls how values are displayed in the lead detail view: a Yes / No field renders as “Yes” or “No”, a Date renders as Jun 15, 2026, a Date & Time renders as Jun 15, 2026 7:30 PM.

Limits

  • Maximum 10 custom fields per agent.
  • Label: max 60 characters.
  • Description: max 200 characters.

Reordering fields

Use the up/down arrows on each field row to change the order. The order controls how fields appear in the lead detail view and in the CSV export.

Editing a field

Click the pencil icon on any field to open the edit dialog. What you can change depends on whether the field has already captured data:

WhatBefore any dataAfter data is captured
DescriptionYesYes
RequiredYesYes
LabelYes — key updates automaticallyOnly if the new label produces the same key
TypeYesNo

Why label and type are locked once data exists. The key (derived from the label) and the type are baked into every stored lead value. Changing either would make previously captured values unreadable. If you need a different label or type after data has been captured, delete the field and create a new one — the old values remain accessible in the lead detail view and CSV exports under the original key.

Deleting a field

Click the delete icon on a field row. A confirmation dialog explains what happens:

  • The field definition is permanently deleted and the agent stops collecting it.
  • Existing leads keep their captured values. These values remain visible in the lead detail dialog and in CSV exports, labelled as archived: <key> columns.

Why keep the data? Deleting a field does not mean those leads are worthless. The captured values are preserved in the lead record so your team can still see and export them. Only the field definition — the label, type, and collection instruction — is removed.

You can create a new field with the same label after deleting one. Because keys are derived from labels, the new field will have the same key. The agent will start collecting fresh values under that key, and existing archived data will now be matched to the new field definition in the leads view.

How Leads Are Stored

  • One lead per chat session. Each conversation produces at most one lead record. If the agent calls the tool more than once in the same session (e.g. the visitor provides more information mid-conversation), the existing lead is updated — not duplicated. Built-in fields are overwritten; custom fields are merged, so earlier values are not erased by a later partial call.
  • Geolocation — the visitor’s approximate city, region, and country are captured automatically from their chat session.
  • Real-time — leads appear in the Leads tab immediately after the agent captures them.
  • Export — download all leads as a CSV from the Leads tab at any time. Active custom field columns appear after the built-in columns. Keys from deleted fields appear as archived: <key> columns at the end, so historical data is never silently dropped.

Intent Detection

The agent automatically infers the visitor’s intent from the conversation and records it on the lead — no configuration needed.

Intent is classified into the following categories:

  • Pricing — visitor is asking about cost, plans, or pricing tiers
  • Demo — visitor wants to see the product in action or schedule a demonstration
  • Sales — visitor is evaluating for a purchase decision
  • Support — visitor needs help with an existing product or service
  • Booking — visitor wants to schedule a call, meeting, or appointment
  • General — visitor is asking general questions without a clear purchase signal
  • Partnership — visitor is interested in a business collaboration
  • Job Applicant — visitor is asking about open roles or career opportunities
  • Spam — conversation shows clear spam or abuse signals
  • Unknown — intent could not be determined

The agent never asks the visitor what their intent is — it reads the context. As the conversation develops, the intent on the lead is updated automatically as stronger signals emerge.

Configuring Timing (via Prompt Builder)

Open the Prompt Builder (✨ Build button on the Instructions field) and navigate to the Lead Capture section. Choose when your agent should ask for contact information:

Ask upfront, before helping

The agent asks for contact details at the very start of the conversation before providing any assistance. Best for gated services where access requires registration, or high-intent landing pages where every visitor is a qualified lead.

Ask naturally after 2–3 exchanges

After a few back-and-forth messages, the agent naturally weaves in a request for contact details. This is the recommended default — it warms up the visitor before asking, which reduces drop-off.

Only when user shows intent

The agent waits until the user signals real intent — mentioning pricing, requesting a demo, describing a project, or asking about next steps. Best for content sites, support agents, or any context where most visitors are browsing and only a subset are qualified leads.

Examples

Basic capture

User: “I’m interested in your pricing plans.”

Agent: “Sure — I can walk you through the options. Would you like me to send detailed pricing to your email?”

User: “Yes, it’s [email protected]

Agent: “Great — I’ve got that. I’ll share the details with you. Let me know if you’re looking at anything specific.”

Lead saved with Email: [email protected] · Intent: Pricing

Custom fields (restaurant reservation)

User: “I’d like a table for 4 on Friday at 8.”

Agent: “Friday at 8 for four — noted. Any dietary requirements, or are you celebrating anything special?”

User: “My wife’s birthday. She’s vegetarian.”

Agent: “Lovely. Could I take a name for the reservation and the best number to confirm?”

User: “Marcus, 503-555-0144.”

Agent: [captures lead with name, phone, partySize: 4, reservationDate: “Friday”, dietaryRequirements: “vegetarian”, specialOccasion: “birthday”]

Lead saved with custom fields extracted from the conversation, no form required.

Tips & Best Practices

  • At least one contact field must be required. Email or phone — pick whichever channel your team actually uses to follow up. Collecting both as optional means a lead can slip through with neither.
  • Use ask upfront only if your service genuinely requires contact info before access. Asking too early on informational sites will cause visitors to abandon the chat.
  • A warm, friendly agent persona significantly reduces drop-off when asking for contact details. Configure tone in the Prompt Builder.
  • Add a description to custom fields whenever the label alone is ambiguous. The description is what the AI reads when deciding what to extract — a precise hint produces cleaner data. For example, a field labelled Party Size with description Total number of guests, including the person making the reservation will produce more consistent values than the label alone.
  • Use the strongest required fields. Mark a custom field required only if your team genuinely cannot act without it. Each required field is a question the agent must ask, which adds turns to the conversation.
  • Check the Leads tab regularly. Leads are captured in real time and visible immediately. Click any row to open the full lead detail view.
  • After enabling Lead Capture, changing field settings, or adding/removing custom fields, use the Prompt Builder to regenerate and re-apply the system prompt so the agent reflects the updated configuration.

Note: The agent automatically rejects placeholder or test email addresses (e.g. [email protected], [email protected]). If a visitor provides an obviously fabricated email domain, the lead will not be saved and the agent will ask for a valid address.