> 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/integrations/salesforce-integration/custom-object.md).

# Custom object

{% embed url="<https://pub-8e1d08f439ec43bdbb79f1055a273a02.r2.dev/salesforce-object-model-and-field-ownership-40fb93c7.mp4>" %}

Kernel can write enrichment to your Salesforce Account records or to the Kernel Account custom object. Its API name is `Kernel_Account__c` in 3.x and `kernel__Account__c` in managed 4.x.

Kernel recommends the custom object route so you can review Kernel data separately before deciding which values should update Account. A configured CRM push can write directly to Account. A Kernel Account to Account mapping can also copy selected values from the custom object.

For an existing Salesforce Account, the linked Kernel Account holds its Kernel data. Kernel Account can also hold a hierarchy entity that does not yet have a corresponding Account. Check the record's role before treating a blank Account link as a missing link.

<figure><img src="https://1215786129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvRYB7XIKCnmUi9oCEQGV%2Fuploads%2FQ8hGnymHYyAlW7oiAEcf%2FCustom%20Object%20Flow.png?alt=media&amp;token=df545369-679e-4f00-9ba4-acb115595f15" alt=""><figcaption></figcaption></figure>

If your account import uses Kernel Account as its source, first copy the permitted Account fields into Kernel Account. If Kernel reads directly from Account, that extra copy is unnecessary. Review the selected source fields, related-object workflows, and integration-user access separately. Choosing Kernel Account as the account source does not by itself describe every workflow enabled in your integration.

### How the sync works

#### 1. Read Salesforce data

The configured import selects the Salesforce source objects, fields, and records to read. Salesforce permissions also limit what the integration user can access. Importing data updates Kernel's copy of that source data.

#### 2. Process the imported records

Identity resolution, enrichment, and recommended action evaluation run through the workflows enabled for your workspace. An import finishing does not by itself mean that these steps have completed.

#### 3. Write the selected results

A CRM push or automatic refresh writes to its configured Salesforce destination. This can be Kernel Account or Account. If you use Kernel Account as the destination, a separate Record Sync configuration can copy selected values onto Account.

Check each stage when investigating a missing value. [Connections and sync](https://docs.kernel.ai/platform/crm) explains the available routes.

## Setting up the object

The setup example below uses 3.x API names. In managed 4.x, use the corresponding fields in [Kernel Account object reference](https://docs.kernel.ai/integrations/salesforce-integration/kernel-account-object-reference.md). Check names in Salesforce Object Manager before saving a mapping.

### 1. Navigate to the Record Sync tab

Open the Kernel application in Salesforce and go to **Record Sync**. Complete [package installation and setup](https://docs.kernel.ai/integrations/salesforce-integration/package-installation-guide.md) first.

### 2. Configure the sync

Set **Source Object** to the object you use in Salesforce to represent an account. Set **Target Object** to `Kernel Account`.

Match the Account `Id` to the Kernel Account lookup that points back to Account. For 3.x, use `Linked_Account_Field__c`; for managed 4.x, use `kernel__CRM_Account__c`. Give the configuration a name that describes its direction.

Use the Salesforce record ID for this match. A Kernel ID identifies a company and cannot replace a Salesforce lookup value.

### 3. Select the fields to copy

Kernel recommends importing directly from Account. If your import uses Kernel Account as its source, use these mappings to copy the source fields it needs.

For the standard Account to Kernel Account sync direction, the package shows these locked mappings:

| Source field | Kernel Account field | Notes                                                 |
| ------------ | -------------------- | ----------------------------------------------------- |
| `Name`       | `Name`               | Copies the source value when this configuration runs. |
| `Website`    | `Kernel_Website__c`  | Copies the source value when this configuration runs. |

Add only the extra source fields your security model allows Kernel to read. If Kernel is pulling directly from the Account object, this step can be left blank.

In managed 4.x, the website target is `kernel__Website__c`. Do not map Account `Id` to Website or Kernel ID. Record matching and field copying have separate settings.

### 4. Filter records

The filter selects source records for this Salesforce field-copy configuration. It does not define every record Kernel can read through other workflows. Leaving the filter blank broadens this copy's source selection. Review CRM import filters and the integration user's Salesforce access separately.

Start with a filter for one known source record. Save the configuration, run the copy, and check the mapped fields on its linked target before widening the scope. Follow [Set up Record Sync and schedules](https://docs.kernel.ai/integrations/salesforce-integration/record-sync-backfill-and-schedules.md) for the full procedure.

{% embed url="<https://www.loom.com/share/c68463bebe13411cb7fd1e77293f08a7>" %}

### Field ownership and record links

Choose which direction maintains each field before scheduling both directions. Account to Kernel Account can copy customer values into Kernel Account. Kernel Account to Account copies only the values included in that configuration.

| Object         | 3.x field                 | Managed 4.x field           | Purpose                                     |
| -------------- | ------------------------- | --------------------------- | ------------------------------------------- |
| Account        | `Kernel_Account__c`       | `kernel__Kernel_Account__c` | Lookup to the related Kernel Account record |
| Kernel Account | `Linked_Account_Field__c` | `kernel__CRM_Account__c`    | Lookup to the related Account record        |

### Kernel ID fields

Kernel ID identifies the company. Salesforce record IDs and lookup fields identify the records used by Record Sync.

| Object         | 3.x field      | Managed 4.x field    | Type |
| -------------- | -------------- | -------------------- | ---- |
| Account        | `Kern_Id__c`   | `kernel__Kern_Id__c` | Text |
| Kernel Account | `Kernel_ID__c` | `kernel__Kern_Id__c` | Text |

Check the type and length of any customer-created destination field before copying an identifier.

In 3.x, Kernel Account `Name` is labeled **Kernel - Trading name** and `Kernel_Legal_Name__c` holds the registered legal name. In managed 4.x, the legal-name field is `kernel__Legal_Name__c`. The values on Kernel Account also depend on the mappings that write to it.

Before retiring an older field, identify it by object and API name. Review its values, Salesforce dependencies, and every integration mapping that reads or writes it. Move those dependencies and test the replacement before deciding whether to delete the old field.

Follow [Set up Record Sync and schedules](https://docs.kernel.ai/integrations/salesforce-integration/record-sync-backfill-and-schedules) to link existing Accounts and configure field copies. Use [Troubleshoot sync](https://docs.kernel.ai/integrations/salesforce-integration/troubleshoot-sync) when a value or record link is missing.

### Custom object reference

To display Kernel Account fields in a dedicated tab on your Salesforce Account record, follow [Show Kernel data on an Account](https://docs.kernel.ai/integrations/salesforce-integration/show-kernel-data-on-account.md). This guide covers Lightning Experience.

See [Kernel Account object reference](https://docs.kernel.ai/integrations/salesforce-integration/kernel-account-object-reference.md) for the field list. It distinguishes 3.x and managed 4.x names for identity, headcount, revenue, NAICS, location, hierarchy, LinkedIn, and account-linking fields.
