# Primary record selection

When Kernel identifies duplicate accounts, it selects one as the **primary record**. The primary record is the version that will be kept and enriched, while the others are merged into it.

Selection is determined in the following order:

{% stepper %}
{% step %}

#### Duplicate type priority

The type with the highest priority in the group takes precedence. Where multiple types are present, the hierarchy applied is:

**Exact > Location > Regional > Trading > Website**
{% endstep %}

{% step %}

#### Identity type

For **Regional** and **Trading** groups, the legal entity is preferred over the trading entity.

For **Location** groups, the parent entity is preferred over the establishment.
{% endstep %}

{% step %}

#### CRM field values

CRM fields configured for primary selection are compared across remaining candidates. By default, risk score and last activity date are used. The record with the highest value is preferred.
{% endstep %}
{% endstepper %}


---

# Agent Instructions: 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:

```
GET https://docs.kernel.ai/primary-record-selection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
