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

# Key fields

> How Kadoa recognizes the same record across runs

A key field identifies a record across runs, such as a product URL, SKU, or posting ID. The agent picks key fields when it builds the schema. Change them only if the agent picked the wrong one.

## What key fields do

* **Track records across runs.** Kadoa knows that a record in today's run is the same record as yesterday's.
* **Remove duplicates.** Rows with the same key count as one record, so a record repeated across pages appears once.
* **Report updates.** [Change detection](https://docs.kadoa.com/docs/change-detection.md) reports an edited record as one update. Without a key field, it shows up as one removal and one addition.

## Good keys

* Use a stable identifier the source publishes: a posting ID, a canonical URL, or a reference number.
* Avoid values that change between runs: prices, counts, timestamps, or free-text titles.
* Use a scalar `STRING`, `NUMBER`, or `LINK` field that is never empty.
* With several key fields, every one must match for two records to count as the same.

If no field works on its own, add a **Unique ID** [function field](https://docs.kadoa.com/docs/workflows/schemas.md#function-fields) and make it the key.

## Change a key field

**Dashboard**

1. In the **Schema** tab, select the field.
2. Select the pencil icon.
3. Turn on **Key field**.
4. Select **Done**.
5. Select **Save changes**.

In the **JSON** editor, set `isKey: true` on the field instead. The field list marks each key field with a key icon.

**SDK & API**

Set `isKey: true` on the field in the schema.

**MCP**

Ask your AI tool, for example:

```text theme={null}
> Make productUrl the key field of my Product Extraction workflow
```

Your AI tool uses `get_workflow` and `update_workflow`, and sets `isKey` on the field.

> [!WARNING]
>
> Changing the key field after runs exist resets change tracking for that workflow.


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