> 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/related-object-import-mappings.md).

# Import fields from related Salesforce objects

Read identity and review fields from Salesforce Account and associated objects using a shared record identifier.

Use an import mapping to combine fields from Salesforce Account and related objects. For example, Account can supply the record ID and name while a related enrichment object supplies the website.

Open [Connections › Salesforce › Data flows](https://app.kernel.ai/settings/connection/salesforce?tab=data-flows) and edit the import mapping. The **Source objects** section contains the controls below. If this section is unavailable in your workspace, ask Kernel Support to check the available mapping options.

## Choose the records and how to match them

| Control                | Purpose                                                                                     |
| ---------------------- | ------------------------------------------------------------------------------------------- |
| **Canonical object**   | Determines which records Kernel reads. Account is the usual starting point.                 |
| **Record ID**          | Identifies the same record across imports. Choose the canonical object's unique identifier. |
| **Associated objects** | Supply additional fields for the canonical records.                                         |
| **Linking field**      | The field on an associated object whose value matches the canonical Record ID.              |

Each object must return at most one record for a given canonical ID. The import fails if multiple records match the same canonical ID. A missing associated match leaves that object's imported fields empty.

The integration user needs read access to each source object, the mapped fields and linking fields, and the relevant records. An object appearing in Salesforce for your administrator does not prove that the integration user can read it.

## Example: use a website from an enrichment object

Suppose your Salesforce org has an `Account_Enrichment__c` object with these fields:

* `Account__c`, a lookup containing the Salesforce Account ID.
* `Verified_Website__c`, the website you want Kernel to use.
* `Is_Current__c`, a checkbox identifying the current enrichment record.

These names are examples. Use your own Salesforce API names.

1. Select **Account** as the **Canonical object**.
2. Map **Record ID** to Account's `Id`.
3. Add `Account_Enrichment__c` under **Associated objects**.
4. Set its **Linking field** to `Account__c`. This matches the Account ID, not the enrichment record's own `Id`.
5. If there are historical enrichment records, open **Filter records** and set `Is_Current__c` to true. Check that this leaves at most one enrichment record per Account.
6. Map the Kernel website input to `Verified_Website__c` from the associated object. Keep the Account name mapped to the appropriate Account field.
7. Review required mappings and field types, then select **Save mapping**.
8. Import a small agreed sample using this mapping. Check an Account with a matching enrichment record and one without a match before applying it to a wider set.

If the Account has no matching current enrichment record, the website input from this object is empty. Mapping that field does not create a fallback to `Account.Website`. Choose a populated source or have your Salesforce administrator provide a field that implements the fallback you need.

## Filters and duplicate matches

Associated-object filters narrow the records used to supply fields. They do not turn a one-to-many relationship into an aggregation. For example, Kernel does not automatically choose the newest enrichment row or combine all linked Contacts into one website input.

If more than one record still matches a canonical ID, correct the source data or filter before importing. The record-count check shows matching records, unique linking IDs, and duplicate matches. A checkbox such as `Is_Current__c` works only when your Salesforce process keeps one current record per Account.

These filters belong to this import mapping. [Scheduled inbound flows](https://docs.kernel.ai/platform/data-setup/scheduled-inbound-flows.md) and [automatic CRM fetching](https://docs.kernel.ai/platform/crm.md#automatically-fetch-crm-changes) also have their own record-selection settings. Review the scope of the flow that will use the mapping.

## Check a missing object or field

1. Confirm the selected production or sandbox connection.
2. Check object access, field access, and record visibility for the integration user.
3. Check the linking field's values against the canonical Record ID. Similar labels are not enough to establish a match.
4. Reopen or retry the metadata controls after correcting access. If the object or field is still unavailable, give Kernel Support its API name, the environment, and an example record ID.

Changing the canonical object or Record ID can change which records Kernel reads and how it recognizes them. Review the existing mapping with Kernel Support before changing these on an established import.

Import mappings read Salesforce data. To copy results back to Salesforce, configure a separate [output mapping](https://docs.kernel.ai/platform/crm.md#edit-an-output-mapping).
