> 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](/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](/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** identifies the connection that receives cleaned data.

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 write source stops receiving cleaned data when you confirm; it remains available for reading.

## 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, cleaning, 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.                                  |

<figure><img src="https://1215786129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvRYB7XIKCnmUi9oCEQGV%2Fuploads%2Fgit-blob-29be3aabeedc0ff77328956d872e6f66a50e38b5%2Fapp-dataflows.png?alt=media" alt="Salesforce Data flows showing the Account import nightly sync and Kernel Account automatic refresh settings."><figcaption><p>Review the direction of each flow and where its schedule is set.</p></figcaption></figure>

Kernel recommends [Kernel Account](/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.

### 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](/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                                                                                             |
| --------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| **Enable nightly sync**, under Account import | Imports CRM data and refreshes cleaning actions once a day.                                        |
| **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.                    |

Nightly sync and automatic refresh are turned off in sandbox environments. Record Sync has its own Salesforce schedule.

### 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.

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](/platform/data-setup.md#inbound-flows). For refresh behavior, see [Automatic refresh](/integrations/salesforce-integration/enrich-with-kernel.md).
