Suggested answer

An External Id is a field flagged as holding a key from another system. It is indexed, and when combined with Unique it is enforced at the database level. It matters for three reasons:

1. Idempotent writes: It enables upsert keyed on the external value, so an integration can insert-or-update without a prior query and can safely replay a failed batch without creating duplicates.
2. Relationship resolution: A child record can reference its parent by the parent's External Id in the relationship column (Parent__r.Legacy_Id__c), so parent-child links resolve at insert time with no Id-mapping step.
3. Decoupling from Salesforce Ids: Upstream systems should never depend on Salesforce-generated Ids, because those change on re-migration and differ between sandbox and production. The External Id is the stable contract.
4. Design guidance: Mark it Unique as well as External Id, use one External Id per source system rather than overloading a single field, and never expose the Salesforce 18-character Id as the integration key in an interface contract.

Practice content for interview preparation; not an official vendor answer. Verify details against current product documentation.

Community comments (0)

No comments yet.

Sign in or create a free account to add a comment. Comments are moderated before they appear.

Plain text only, 3–2000 characters. A moderator reviews every comment before it is published.