> For the complete documentation index, see [llms.txt](https://docs.chatlayer.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chatlayer.ai/start-quickly/bot-templates/lead-generation.md).

# Lead generation

This is a short template for lead generation: your customers get a free trial if they give in their details. A flow easy to adapt to any chatbot!

{% hint style="info" %}
Make sure to always [update the NLP](https://docs.chatlayer.ai/understanding-users/natural-language-processing-nlp#updating-the-nlp) after loading a template!
{% endhint %}

## Flow: Lead Generation

The Lead Generation blocks have their own flow. More general blocks like Introduction and Goodbye are in the General flow.

User details are asked through input validation blocks and kept under the variables `{userName}`, `{userEmail}` and `{userPhoneNumber}`. In the Thanks block, users get the opportunity to change their details in case they make a mistake.

The block named \[API Call] is a placeholder for the Action block where you would implement your API call to keep your customer's data.

{% hint style="info" %}
There are several ways for you to keep the customer details. Some ways to do that could be using [Airtable](https://docs.chatlayer.ai/integrations/app-integrations/airtable-app-integration) or creating your own [API custom integration](https://docs.chatlayer.ai/integrations/custom-back-end-integrations).
{% endhint %}

Make sure you adapt the flow to the user details that you need and that you give to your customers the opportunity to modify those details.

Happy bot building!


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.chatlayer.ai/start-quickly/bot-templates/lead-generation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
