> For the complete documentation index, see [llms.txt](https://docs.sprinthub.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sprinthub.com/en/topics/convert/chatbot/chatbot-common-questions/chatbot-identification-using-lead-field.md).

# Chatbot - Identification using Lead Field

In some flows of **Chatbot**, it may be necessary to identify a Lead using information already existing in the record, such as **CPF, email, phone, or another custom field**.

This identification allows the bot **to locate the contact in the CRM**, personalize the service, and use data already recorded in the system.

{% embed url="<https://youtu.be/EKsUw6X2JMc>" %}

***

### 📌 When to use this identification

This feature is useful when the flow needs to:

* Identify a **customer already registered** in the system;
* Retrieve existing information in the **Lead profile**;
* Direct the service based on **data already recorded**;
* Avoid duplicate records.

Identification examples:

* CPF or CNPJ
* Email
* Phone number
* Registration code
* Order number
* Reservation code

***

### ⚙️ How to configure in Chatbot

#### 1️⃣ Ask the user for the information

In the Chatbot flow, use a **Question** block to request the data that will be used for identification.

Example:

> “To locate your record, please provide your CPF.”

Define the response type as needed:

* Text
* Numeric
* Email

Save the response in a **flow variable**.

***

#### 2️⃣ Use the Lead identification action

After collecting the information, add a **Action** block to the flow.

Select the option to **identify or locate Lead** using an existing field.

In the search field, configure:

* **Lead field:** choose the field that will be used for identification (e.g.: CPF, Email, Phone).
* **Value:** use the variable that stored the user's response.

***

#### 3️⃣ Define the flow behavior

After identification, the flow can follow different paths:

**If the Lead is found:**

* Continue the service with the record data;
* Update contact information;
* Redirect to a specific department.

**If the Lead is not found:**

* Request the data to create a new record;
* Redirect to manual support;
* Restart the identification attempt.

***

### 💡 Best practices

✔ Use fields **unique**, such as CPF or email, to avoid identifying the wrong Lead.

✔ Validate the information format whenever possible (e.g.: email field).

✔ Inform the user why the data is being requested to improve the experience.

Example:

> “We only need your CPF to locate your record in the system.


---

# 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.sprinthub.com/en/topics/convert/chatbot/chatbot-common-questions/chatbot-identification-using-lead-field.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.
