Indirect Lookup Relationship
An indirect lookup relationship is a Salesforce field on an external object that points to a standard or custom Salesforce object record, keyed on a custom external ID field marked Unique on the Salesforce side.
Definition
An indirect lookup relationship is a Salesforce field on an external object that points to a standard or custom Salesforce object record, keyed on a custom external ID field marked Unique on the Salesforce side. It is the reverse direction of an external lookup: instead of a Salesforce record reaching out to an external system, an external object reaches into Salesforce and joins on a business identifier the user controls.
The pattern lets external data brought in through Salesforce Connect resolve back to Salesforce master records without forcing the external system to know the 15-character Salesforce ID. A product master in SAP can carry its own SKU, and the SKU sits on the Salesforce Product record as a unique external ID. The indirect lookup field on the external object then joins on SKU, surfacing the related Salesforce Product alongside the external transaction data.
How indirect lookups bring external data back into Salesforce models
The direction of the join, and why it matters
Indirect lookup lives on an external object and points at a Salesforce object. The arrow goes from the external row into the Salesforce data model. External lookup goes the opposite direction, with a Salesforce record pointing out to an external row. Picking the wrong direction during design is the most common mistake, and the symptoms only appear at runtime when the relationship cannot resolve. Sketch the join arrow before opening Object Manager.
Unique external ID on the Salesforce side
The Salesforce field that an indirect lookup joins on must be both External ID and Unique. Without the Unique flag, multiple Salesforce records can hold the same key and the platform cannot pick a winner. The field can be text, number, or email, but text is by far the most common choice. Plan the data type before the relationship goes live because changing the join field type after the fact requires recreating the indirect lookup.
Salesforce Connect is still required
Indirect lookup only exists for external objects, and external objects only exist with Salesforce Connect. The add-on is licensed separately from base CRM and per external object. If the external object never gets created, the indirect lookup field type stays hidden in the Setup picker. Confirm Connect entitlement and external data source registration before promising the design to stakeholders.
Bidirectional models with external and indirect lookups
Many integrations use both relationship types in opposite directions to build a round-trip view. The Salesforce Account uses an external lookup to reach a customer master in the external system. The external object representing an order line uses an indirect lookup back to the Salesforce Product through SKU. The result is a screen that shows Salesforce records, external rows, and Salesforce records again, all resolved at query time without ETL.
Resolution behavior when the key has no match
If the external row holds a key value that no Salesforce record matches, the indirect lookup field renders as blank with no error. Users see an empty link and assume the data is missing. This is the most common support ticket for indirect-lookup deployments. Build a periodic reconciliation job that counts unresolved indirect lookups, and alert when the count exceeds an acceptable threshold for the integration.
Performance and pushdown limits
Indirect lookup resolution happens server-side during the page render or report run. Each unresolved row costs an internal lookup against the unique external ID field. For external objects with millions of rows, this is fine because the unique index does the heavy lifting. For reports that traverse the indirect lookup across thousands of external rows, the cumulative cost can blow report timeouts. Limit indirect-lookup traversal to one level in dashboard contexts when possible.
Common production failure modes
The Salesforce record gets re-merged or deleted, but the external row still holds the old external ID. The user sees a blank indirect lookup and the data appears to be missing. Or the integration loads new external rows with a key value that has not yet been created on the Salesforce side, producing temporary mismatches during cutover windows. Plan both the deduplication and the load-order strategy before going live, and document the recovery steps for support.
How to create an Indirect Lookup Relationship
Indirect lookup needs Salesforce Connect, a registered external data source, an external object, and a unique external ID field on the target Salesforce object. Once the prerequisites line up, the field is straightforward. The hard part is choosing the right join key and proving the keys actually match across both systems.
- Identify the business key that joins both systems
Talk to the data owner on both sides. SKU, customer number, transaction reference, employee badge ID: pick the identifier that both systems treat as authoritative. Avoid surrogate keys that one system can regenerate without notifying the other, because that produces silent breakage.
- Create the unique external ID field on the target Salesforce object
Object Manager, target object, Fields and Relationships, New, Text (or appropriate type). Check both External ID and Unique. Without Unique, the indirect lookup will not appear as an option in the external object configuration.
- Backfill the unique field with current values
Load the existing business keys into the new field through Data Loader. Validate that no duplicates exist before the Unique constraint catches them at load time. Plan a remediation step for any conflicts you find, because the source system may already have inconsistencies.
- Open the external object and create the indirect lookup field
Object Manager, the external object (suffix __x), Fields and Relationships, New, Indirect Lookup Relationship. Pick the target Salesforce object and the unique external ID field as the join key. Save and validate that the relationship resolves on a known matching record.
- Configure layouts and FLS
Add the indirect lookup to the external object page layout and to any related lists on the Salesforce parent object. Set field-level security per profile or permission set. Profiles without read access see the field as blank and may report it as missing data.
- Build the reconciliation report
Create a report that lists external object rows whose indirect lookup resolves to no Salesforce record. Schedule it to run daily and route the output to the integration team. This is the early warning system for missing keys before users complain.
- Document the recovery runbook
Write down the steps to handle the three common failure modes: a Salesforce record is deleted but external rows still reference it, a new external row arrives with no Salesforce match, and a duplicate key blocks a load. Hand the runbook to support before go-live so unresolved lookups do not escalate.
The standard or custom object the external row joins to. Selected during indirect lookup field creation.
Must have both External ID and Unique flags checked. Stores the business key the external system uses.
The __x object exposed through Salesforce Connect where the indirect lookup field lives. Holds the key value to resolve.
- The join field on the Salesforce side must be marked Unique, not just External ID. Without Unique, the field does not appear in the indirect lookup picker and the platform gives no clear error.
- An external row whose key has no matching Salesforce record shows as blank with no error. Users report it as missing data, and the integration team learns about it through support tickets.
- Merging or deleting Salesforce records breaks any external rows still holding the old key. There is no automatic cleanup on the external side because Salesforce cannot write to the source system.
- Indirect lookup needs Salesforce Connect. The field type is hidden if the add-on is not licensed, regardless of org edition or how many external systems you have.
- Changing the data type of the unique external ID later requires recreating the indirect lookup. Plan the field type (text, number, email) carefully before the first external row loads.
Trust & references
Cross-checked against the following references.
- Relationship Fields on External ObjectsSalesforce Help
- Salesforce Connect ConsiderationsSalesforce Help
- Custom Field AttributesSalesforce Help
Straight from the source - Salesforce's reference material on Indirect Lookup Relationship.
- Relationship Fields on External ObjectsSalesforce Help
- External Data SourcesSalesforce Help
- Salesforce Connect OverviewSalesforce Help
Hands-on resources to go deeper on Indirect Lookup Relationship.
About the Author
Dipojjal Chakrabarti is a B2C Solution Architect with 29 Salesforce certifications and over 13 years in the Salesforce ecosystem. He runs salesforcedictionary.com to help admins, developers, architects, and cert/interview candidates sharpen their fundamentals. More about Dipojjal.
Test your knowledge
Q1. What is an Indirect Lookup Relationship?
Q2. How does Indirect Lookup differ from External Lookup?
Q3. What does Indirect Lookup match on?
Discussion
Loading discussion…