> 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/crm.md).

# Connections and sync

Connect Salesforce, choose which fields Kernel reads and writes, and review syncs.

Open [Connections → Salesforce](https://app.kernel.ai/settings/connection/salesforce) to manage your Salesforce connection and data flows. Use [Data setup](https://docs.kernel.ai/platform/data-setup.md) for the first connection, risk settings, and identity matching.

## Connection

The **Connection** tab shows the connected org, environment, integration user, connection status, and installed package version. Use **View details** to inspect the connection and **Update package** to install a newer Salesforce package.

Salesforce permissions control which objects and fields Kernel can read or change. The integration user needs read access to imported fields and the appropriate create or edit permissions for destination objects and fields. The [Salesforce integration guide](https://docs.kernel.ai/integrations/salesforce-integration.md) covers installation and permissions.

Use **Disconnect** to remove a Salesforce connection. To use that org again, complete connection setup again.

### Choose the write source

Kernel can read from several connected sources, with one write source per environment. **Current write source** shows the selection for supported write-back actions.

To change it, select **Make write source** on the intended connection, type the provider name shown in the confirmation, and select **Change write source**. The previous connection remains available for reading.

Existing scheduled imports and exports keep their saved output settings. Review and update those flows separately when changing where results should go. See [Write source](https://docs.kernel.ai/integrations/write-source.md) for details.

## Data flows

[Open Salesforce Data flows](https://app.kernel.ai/settings/connection/salesforce?tab=data-flows)

A data flow maps a source field to a destination field. The page separates what Kernel reads from what it writes.

| Flow                            | Direction                                | What it does                                                                                            |
| ------------------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| **Account import**              | Salesforce Account → Kernel              | Reads the account fields used for identity matching, recommended action evaluation, and account review. |
| **Kernel Account**              | Kernel → `Kernel_Account__c`             | Writes Kernel results to a separate Salesforce object for review.                                       |
| **Record Sync**                 | `Kernel_Account__c` → Salesforce Account | Copies selected Kernel Account fields onto Account. Salesforce runs this on its own schedule.           |
| **Account**, under **Advanced** | Kernel → Salesforce Account              | Writes Kernel results directly to the mapped Account fields.                                            |

Kernel recommends [Kernel Account](https://docs.kernel.ai/integrations/salesforce-integration/custom-object.md) as the destination for results. It lets your team review them before copying selected values to Account.

**Record Sync** and direct **Account** mappings overwrite their mapped Account fields. Check the direction and destination at the top of the editor before saving.

Use **Set up**, **Add**, or **Add data flow** beside an unconfigured flow to create it. If the page asks for a direction, choose **Into Kernel** for an import or **Out of Kernel** for a write. Name the flow, then configure its fields.

### Edit an import mapping

Select **Edit** beside **Account import**.

1. Choose the Salesforce **Source field** for each Kernel **Target field**.
2. Check the **Type** column. Resolve any unavailable or incompatible field shown in the editor.
3. Use **Add field** for another input. Use the row checkbox to include or exclude an optional mapping.
4. Select **Save mapping**. The next import uses the saved mapping.

**Record ID** stays enabled so Kernel can recognize the same account on later imports. Required mappings also stay enabled. Identity fields are locked after you approve the identity configuration.

Kernel fetches related opportunity names and related contact domains automatically. The editor lists these above the mapping table.

If your inputs live on another Salesforce object, use **Source objects** to choose a **Canonical object**, then add **Associated objects** and their linking fields. Each associated record must match the canonical **Record ID**. See [Import fields from related Salesforce objects](https://docs.kernel.ai/integrations/salesforce-integration/related-object-import-mappings.md) for a worked example and the limits on matching records.

### Edit an output mapping

Select **Edit** beside **Kernel Account**, **Record Sync**, or **Account**.

1. Select the source field and destination field for each row.
2. Check the field types and resolve any highlighted errors.
3. For Kernel output mappings, select the rows to include. **Record Sync** uses all of its mapped rows.
4. Use **Add field** to add a row. For **Kernel Account**, **Add default fields** adds the standard field set.
5. Select **Save mapping**.

**Export CSV** saves the mapping so you can review or reuse it. **Import CSV** loads a mapping into the editor; review it and select **Save mapping** to apply it. These controls exchange mapping definitions, not account records.

Record Sync changes are saved to Salesforce and can take about a minute to appear. Configure its schedule in Salesforce under **Kernel Setup → Record Sync**. Follow [Record Sync and schedules](https://docs.kernel.ai/integrations/salesforce-integration/record-sync-backfill-and-schedules.md) for the package controls, backfills, and field behavior.

### Impact sets

If the editor includes **Impact sets**, use **Add impact set** to name a group and add conditions on CRM fields. Every condition in a set must match.

For Kernel output mappings, impact sets show how a proposed sync would move selected accounts into or out of the groups you care about. Review this in the sync preview from Accounts.

For **Record Sync**, impact sets control which records are copied. A record must match every condition in at least one set. With no sets, Record Sync includes every Kernel Account linked to an Account. Adding impact sets replaces any custom Record Sync filter already set in Salesforce.

### Set the timing

| Setting                                                   | Effect                                                                                                           |
| --------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| **Automatically fetch CRM changes**, under Account import | Fetches CRM changes daily to update risk tiers, flag drifted accounts and keep Kernel’s recommendations current. |
| **Automatic refresh**, under Kernel Account               | Chooses how often Kernel updates Kernel Account: **Never**, **Monthly**, **Weekly**, or **Daily**.               |
| **Record Sync schedule**, in Salesforce                   | Chooses when Salesforce copies the selected Kernel Account fields onto Account.                                  |

Automatic CRM fetching and Automatic refresh are turned off in sandbox environments. Record Sync has its own Salesforce schedule.

### Automatically fetch CRM changes

Fetches CRM changes daily to update risk tiers, flag drifted accounts and keep Kernel’s recommendations current.

This brings Salesforce account data into Kernel using your saved import mapping. Enabling the setting also enables the recommendation refresh. Changes to ownership, activity, opportunities and related records help Kernel reassess risk tiers and safeguards.

Kernel checks fetched accounts for identity drift. The recommendation refresh updates duplicate groups and Kernel’s recommendations. Kernel also removes outdated recommendations, including those for records deleted from Salesforce, and keeps parent-account references current within the existing hierarchy.

Identity drift means the CRM details used to identify a company have changed since Kernel matched the account. Kernel flags the account for review. Fetching those changes does not automatically identify the company again.

Use the controls under **Account import** to choose which records to fetch:

* **Only update accounts already in Kernel** skips CRM accounts that have not been added to Kernel.
* **Only fetch accounts matching** accepts a Salesforce condition, such as `Type = 'Customer'`, without `WHERE`. Leave it empty to apply no extra filter. Changing it fetches matching records again on the next run. The existing-accounts setting still applies.

The filter limits the fetch. Later risk scoring and Kernel’s recommendations can cover the wider set of CRM accounts already in Kernel.

Newly fetched CRM accounts need a separate identification and enrichment step. A configured [Scheduled inbound flow](https://docs.kernel.ai/platform/data-setup/scheduled-inbound-flows.md) can process them if its filter and processing limits include them.

<figure><img src="https://1215786129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvRYB7XIKCnmUi9oCEQGV%2Fuploads%2Fgit-blob-8d6aac5a4f5a2664e25a392303d8b0b2db5aed36%2Fcrm-fetch-new-records.png?alt=media" alt="Automatically fetch CRM changes stores a new CRM record. A separate step links it to a Kernel identity and enriches the company."><figcaption><p>Fetching a CRM record and identifying the company are separate steps.</p></figcaption></figure>

The daily fetch is separate from [Automatic refresh](https://docs.kernel.ai/integrations/salesforce-integration/enrich-with-kernel.md), which writes changed Kernel values to Salesforce, and **Record Sync**, which copies selected values from Kernel Account to Account. [Scheduled inbound flows](https://docs.kernel.ai/platform/data-setup/scheduled-inbound-flows.md) have their own filters, processing and schedules.

Runs depend on connection availability and queueing. Daily runs pause after 14 days without Customer App activity. Returning to the app can trigger a catch-up run.

If [Auto merging](https://docs.kernel.ai/platform/data-setup/auto-merging.md) is enabled separately, eligible inbound duplicates can also be queued for merging. The configured risk tiers and safeguards still apply.

### Manage mappings

Use a mapping's action menu to **Set default** or **Delete configuration**. A default mapping cannot be deleted. Record Sync offers **Reset to default mapping** instead of deletion. Mappings marked **Managed by Kernel** are locked.

## Advanced

[Open Salesforce Advanced](https://app.kernel.ai/settings/connection/salesforce?tab=advanced)

### Ingested objects

Turn **Import opportunity data** on or off, then select **Save**. This controls whether Kernel imports Salesforce Opportunity data.

### Accessible objects

This list shows objects linked to accounts that the integration user can read. Select an object to open its definition in Salesforce. Change the integration user's Salesforce permissions if a needed object is missing.

### New accounts

Set the values Kernel supplies when it creates a Salesforce account.

For each row, choose **Kernel field** to use a value from the company record, or **Fixed value** to use the same value for every new account. Then choose the destination **CRM field**.

Use **Add mapping** for more fields and select **Save**. Map every field Salesforce requires for account creation. Required destination fields show a lock and cannot be removed.

## Sync history

[Open Sync history](https://app.kernel.ai/data-flows) to review CRM writes and start a sync with **Run sync**.

The history shows the destination, account count, successful and failed records, and status. A running sync shows its progress and processed account count.

The account count belongs to that outbound run. It is not the total number of tracked accounts, the number imported from Salesforce, or the number researched. An automatic refresh can include fewer accounts because it sends changed values. Check the destination and failed records before treating a run as successful delivery.

If your Accounts page has **Sync to sources**, start the sync there instead: select a data flow, review the account count, and confirm.

For inbound schedules and their selection filters, see [Inbound flows](https://docs.kernel.ai/platform/data-setup.md#inbound-flows). For refresh behavior, see [Automatic refresh](https://docs.kernel.ai/integrations/salesforce-integration/enrich-with-kernel.md).
