> For the complete documentation index, see [llms.txt](https://docs.kernel.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kernel.ai/platform/data-setup.md).

# Data setup

Connect your source, map fields, set risk rules, and test identity matching.

Start in [Connections](https://app.kernel.ai/settings/connection) and choose your source. Salesforce setup follows **Connection → Data flows → Configure risk → Entity resolution**. Each step unlocks the next one as you complete it.

For file-based setup, follow [Amazon S3](/integrations/s3-integration.md). For Clay, follow [Use a Kernel key](/integrations/clay/connect-your-kernel-account.md).

## 1. Connect Salesforce

[Open Salesforce](https://app.kernel.ai/settings/connection/salesforce) and connect the org you want Kernel to use. Check the selected environment and connected Salesforce user.

The integration user needs access to the source account fields and destination fields. Follow the [Salesforce integration guide](/integrations/salesforce-integration.md) for installation and permissions.

## 2. Map fields

Open **Data flows → Account import → Edit**. Match the Salesforce source fields to the inputs Kernel should read. For example, map **Website** to **Account URL** and **Parent Account ID** to **Parent Account ID**.

Choose fields your team keeps accurate. A reliable legal name, website, address, or parent helps Kernel distinguish companies with similar names. Check any unavailable field and correct it before saving.

**Save mapping** prepares the fields for the next import. Set up the destination separately under **To Salesforce**. [Connections and sync](/platform/crm.md#data-flows) explains the import and output editors, nightly sync, automatic refresh, and Record Sync.

## 3. Configure risk

[Open Configure risk](https://app.kernel.ai/settings/connection/salesforce?tab=configure-risk).

Risk settings determine how cautiously Kernel treats an account when recommending a data action. Use the three sections to:

* Add **Safeguards** to protect records from deletion or being merged away.
* Set **Risk scoring** rules and the score boundaries for your risk tiers.
* Classify **User types** so ownership contributes the right level of risk.

[Risk management](/platform/data-setup/configuration.md) explains each setting. [Active users](/platform/data-setup/active-users.md) covers user classification and ownership.

## 4. Test entity resolution

[Open Entity resolution](https://app.kernel.ai/settings/connection/salesforce?tab=entity-resolution).

Entity resolution matches a CRM record to a real company and gives that company a [KERN ID](/concepts/kern-id.md). Test a small sample before approving the settings for your CRM.

### Choose an identity mode

Select **New run** to open **Configure identity matching**. Choose how Kernel should resolve a conflict between the account name and website when no legal name is provided:

| Mode                  | Use it when                                                     |
| --------------------- | --------------------------------------------------------------- |
| **Bias towards URL**  | Your websites are more reliable than account names.             |
| **Bias towards name** | Your account names are curated and more reliable than websites. |

Review **Fields used for entity resolution** to see which Salesforce fields supply the name, legal name, websites, LinkedIn URL, address, country, and other identity evidence. Country strongly influences the country of legal registration. Update the import mapping if the wrong field is being used.

### Choose a sample

Enter a **Sample SOQL query (WHERE/ORDER/LIMIT)** to select up to 500 accounts. For example:

```sql
WHERE LastModifiedDate = LAST_N_DAYS:30
ORDER BY LastModifiedDate DESC
LIMIT 100
```

The query selects the records in the test. The identity mode and field mappings control how those records are matched.

Select **Test sample** and wait for the run to finish. Open the completed run to review the matched companies, confidence, reasoning, and changed fields. Use **Columns** to show the information you need. The **Accounts** tab brings together the accounts included in your test runs.

Include difficult examples in your review: companies with similar names, subsidiaries that share a parent website, records with missing websites, and records whose legal name differs from their trading name.

### Approve the settings

After a successful test, select **Approve & Lock**, choose the tested identity mode, and confirm. Kernel uses the approved identity settings across your CRM.

Approval locks the identity field mapping and mode. Contact the Kernel team to unlock them when a change is needed. See [Entity resolution](/concepts/entity-resolution.md) for how the matching works.

## Inbound flows

After completing Salesforce setup, use [Inbound flows](https://app.kernel.ai/settings/connection/salesforce?tab=inbound-flows) to configure recurring imports and manage existing flows.

A new scheduled flow uses saved import and output mappings, a required CRM filter, and a schedule. Kernel provides the processing for new flows; a separately linked enrichment workflow is not required.

Follow [Scheduled inbound flows](/platform/data-setup/scheduled-inbound-flows.md) to prepare the mappings, create a flow, and review its configuration. For API-triggered enrichment, see [Inbound API](/developer/inbound-api.md).
