> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getnexor.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Lead metadata: the keys a task's leads arrive with

> See which metadata keys the leads of a task arrive with, the type of each key (text, number, date, yes / no) and whether it is Required or Optional. Nexor detects them from the task's 1,000 most recent leads, leaving test leads out, and the list is read-only. Metadata is information you send when you add leads, through the API, a CSV file or an integration such as HubSpot, and the agent sees it as information about the lead. To have the agent ask for information in the conversation, use Variables.

**Metadata** is information about a lead that you send when you add it, for example the plan it is interested in, an amount, or the campaign it came from. The agent sees it as information about the lead and can use it in the conversation.

The **Lead metadata** section of a task lists the keys its leads arrive with, so you can see what your systems send and what each lead should carry.

![The Lead metadata section of a task: the subtitle Detected from 60 leads, four Required keys such as dias\_mora (number) and fecha\_vencimiento (date), the Optional keys numero\_contrato and sucursal (text), and Show 5 more at the bottom.](https://mintcdn.com/nexor/RI6HCEmMJJzJSwJQ/images/task-lead-metadata-en.png?fit=max\&auto=format\&n=RI6HCEmMJJzJSwJQ\&q=85\&s=cd2689d024c4f23da31b5331fed77973)

## Where metadata comes from

| Source | What becomes metadata |
| - | - |
| API | The `metadata` object you send with [Create or Update Leads](https://docs.getnexor.ai/docs/en/api/leads/create-lead.md). Any other field that is not a standard lead field also goes into metadata. |
| API, many leads at once | The keys you merge into existing leads with [Bulk Patch Metadata](https://docs.getnexor.ai/docs/en/api/leads/patch-metadata.md). |
| CSV or Excel file | The columns you import as **Metadata**. See [Upload leads from CSV or Excel](https://docs.getnexor.ai/docs/en/guides/agents/leads/csv-upload.md). |
| Integrations | Fields your CRM sends with each lead, depending on how you map them, for example in [HubSpot](https://docs.getnexor.ai/docs/en/guides/agents/leads/hubspot.md). |
| A lead added by hand | The JSON under **Advanced**. See [Add a lead manually](https://docs.getnexor.ai/docs/en/guides/agents/leads/manual-upload.md). |

To point the agent at a specific key in its instructions, mention it with `@`. See [Personalize the initial context with metadata](https://docs.getnexor.ai/docs/en/guides/agents/prompt-best-practices.md#personalize-the-initial-context-with-metadata).

To have the agent ask for or collect information during the conversation, use [Variables](https://docs.getnexor.ai/docs/en/guides/agents/settings.md#variables).

## Find the section

Open the agent, open one of its tasks, and look in the right pane. **Lead metadata** is below **Stages**. It appears only when the task's leads arrive with metadata. The list is read-only: it always shows what Nexor detects in the leads.

## Read the list

Each row is one key:

| Part | What it shows |
| - | - |
| Key | The key name exactly as it arrives in the lead's metadata, for example `monto_deuda`. |
| Type | **text**, **number**, **date**, or **yes / no**. |
| **Required** or **Optional** | Whether each lead arrives with this key. |

Required keys come first, then the keys that more leads carry. The subtitle, **What each lead should arrive with. Detected from N leads.**, says how many leads the list was detected from. A list longer than 7 keys shows the first 7 and folds the rest behind **Show N more**. **Show fewer** folds them again.

## How Nexor detects the keys

| Rule | What it means |
| - | - |
| Which leads | The 1,000 leads that most recently entered the task. Test leads, such as the ones the Playground creates, are left out. See [Test leads](https://docs.getnexor.ai/docs/en/guides/agents/leads/test-leads.md). |
| Required | A key is **Required** when every one of those leads has a value for it. If one lead arrives without it, or with it empty, the key is **Optional**. |
| Type | The most common kind among the key's values: **number** for numbers, also when sent as text (`1500` or `"1500"`); **date** for dates such as `2026-11-27`; **yes / no** for `true` or `false`; **text** for everything else. On a tie, the first in this order wins: text, number, date, yes / no. |
| Empty values | An empty or null value, an empty list, or an empty object does not count as having the key. |

The list describes what arrived. It does not change how the agent behaves and does not reject a lead that arrives without a key.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.