> 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.&#x20;

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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
