Collect leads action
Capture names, emails and phone numbers from interested visitors in chat, save them as contacts and send them on through webhooks.
Working draft. These docs are illustrative: names, endpoints and examples describe the intended behaviour and can change before launch.
The Collect leads action asks a visitor for their contact details at the right moment in a conversation and saves them as a lead. Use it on sales agents, pricing questions and any page where interest should reach your team.
Set it up
- Open the agent and select Actions.
- Select Add action and choose Collect leads.
- Choose the fields to ask for: Name, Email, Phone and Company. Mark each one required or optional.
- Write the description: "Use this when the visitor asks about pricing, a demo or a quote and has not shared an email yet."
- Write the Intro message the agent says before asking, for example "I can have someone follow up. Where should we send it?"
- Turn the action on and select Save.
You should see a short form or a set of questions in the Playground when you ask about pricing.
When the agent asks
The agent asks when the description matches the conversation. Two settings control the timing.
| Setting | Effect |
|---|---|
| Ask after | Ask only after a number of messages, so the visitor gets help first. |
| Ask once | Do not ask again in the same conversation once a lead is saved. |
Asking too early costs you conversations. Let the agent answer the first question, then ask.
What happens to a lead
- The lead is saved as a contact. See Contacts overview.
- The
leadevent fires in the browser, which lets your site run its own tracking. - The
lead.capturedwebhook is sent, so your CRM or inbox can receive it. See Webhooks. - If a Salesforce connection is active, a procedure can create the record there. See Salesforce actions.
Test it
- Open Test > Playground and ask about pricing.
- Share a sample name and email.
- Open Contacts and confirm the new entry.
Note: Tell visitors what you do with their details. A line such as "We will email you about this request only" in the intro message sets the right expectation. This is not legal advice.
For questions that are not about sales, such as an order number, use Collect data.