External ID is your bridge between Salesforce and the rest of your business ecosystem.
If you work with Salesforce Data integration or Data migrations, you’ve likely run into a common challenge: how do you match records in Salesforce with records from another system — like an ERP, a legacy CRM, or a marketing automation tool — without constantly juggling Salesforce’s internal 18-character Record IDs?
The answer is the External ID in Salesforce. It’s one of the most powerful yet underutilized features in the Salesforce Admin tool. In this guide, we’ll break down exactly what it is, how it works, how to set it up, and why it’s essential for any clean, scalable Salesforce implementation.
Table of Contents
ToggleWhat is External ID in Salesforce?
An External ID in Salesforce is a custom field that has the External ID attribute enabled. It is designed to store unique record identifiers that originate from a system outside of Salesforce — such as an ERP system, a third-party CRM, an e-commerce platform, or any external database.
In simple terms: while Salesforce automatically assigns every record a unique internal Record ID (like 0036g000002aAbCDEF), this ID has no meaning in your external systems. The External ID field lets you store your own identifier — the one that exists in your other tools — directly on the Salesforce record.
Official Definition: An External ID is a custom field with the External ID attribute checked, meaning it contains unique record identifiers from a system outside of Salesforce. The import wizard uses External IDs to detect existing Salesforce records that match those values in the import file.
This is a case-insensitive operation by default. However, if you also check the Unique attribute and enable the case-sensitive option, then values like "ABC" and "abc" will be treated as distinct records.
Why External ID Matters for Salesforce Admins
Understanding the External ID field is a core competency for any Salesforce Administrator. Here’s why it’s so important:
- No need for Salesforce Record IDs during imports: You can import and update data using identifiers from your source system, without needing to first export Salesforce IDs.
- Duplicate prevention during integration: The Data Import Wizard and data loader tools automatically detect existing records by matching External ID values, preventing accidental duplicate creation.
- Faster data retrieval: When a field is marked as External ID, Salesforce automatically indexes that field, making searches and filters significantly faster.
- Powers UPSERT operations: External ID is the key enabler of the
upsertDML operation — one of the most efficient ways to synchronize data between Salesforce and external systems. - Sidebar search visibility: External ID fields become searchable directly through Salesforce’s sidebar search, making it easier for users to look up records by external reference numbers.
Supported Field Types for External ID in Salesforce
Not every Salesforce field type can be designated as an External ID. Salesforce only supports a specific set of custom field types for this attribute:
| Field Type | Description | Best Used When |
|---|---|---|
| Text | Stores alphanumeric values | External IDs are strings (e.g., “CUST-12345”) |
| Number | Stores integer or decimal values | External IDs are numeric (e.g., legacy integer keys) |
| Stores email addresses | Email is the unique identifier in your source system | |
| Auto Number | System-generated sequential number | You want Salesforce to auto-generate a unique reference |
| Text (Encrypted) | Encrypted text for sensitive data | The external identifier is sensitive (e.g., government IDs) |
Important: Standard field types like Checkbox, Date, Picklist, or Formula cannot be used as External IDs. You must create a custom field of one of the supported types above.
External ID vs. Unique ID — Key Differences
These two concepts are often confused by Salesforce Beginners. Here’s a clear breakdown:
| Feature | Unique ID | External ID |
|---|---|---|
| What it is | A field setting (attribute) | A field attribute (can combine with Unique) |
| Primary purpose | Prevent duplicate values within Salesforce | Link records to identifiers in external systems |
| Scope | Internal data consistency only | Cross-system data integration |
| Enables UPSERT? | No | Yes |
| Auto-indexed? | No | Yes |
| Counts toward 25-field limit? | Yes | Yes |
Â
You can — and often should — check both the Unique and External ID attributes on the same field. This ensures that no two Salesforce records share the same external identifier, and that the field can be used for data imports and integrations.
How to Create an External ID Field in Salesforce (Step-by-Step)
Follow these steps to create an External ID field on any standard or custom Salesforce object:
Step 1 — Navigate to Object Manager
Go to Setup → In the Quick Find box, type Object Manager → Click on it. Then select the object you want to add the External ID to (e.g., Contact, Account, or a custom object).
Setup → Object Manager → [Select Your Object]
Step 2 — Open Fields & Relationships
In the left-hand sidebar of the object, click on Fields & Relationships. Then click the New button to create a new custom field.
Step 3 — Choose a Supported Data Type
From the Data Type list, select one of the supported types: Text, Number, Email, Auto Number, or Text (Encrypted). Click Next.
Step 4 — Configure Field Details
Enter the Field Label, Length, and Field Name. Optionally add a Description and Help Text.
To prevent duplicate external IDs, check “Do not allow duplicate values”. If your external system is case-sensitive (treats “ABC” and “abc” differently), check “Treat ‘ABC’ and ‘abc’ as different values (case sensitive)”.
Step 5 — Check the External ID Box
This is the key step — scroll down and check the External ID checkbox. This marks the field as an External ID field and enables automatic indexing and UPSERT support. Click Next.
Step 6 — Set Field-Level Security and Save
Choose the appropriate field-level security settings for each profile. Click Next, then choose the page layouts to add this field to. Click Save. Your External ID field is now active.
Pro Tip: Although the Required attribute is not mandatory, it is recommended to select both Unique and External ID attributes together. This ensures data integrity during imports and integration operations.
External ID and the UPSERT Operation
One of the most powerful aspects of External ID in Salesforce is its Role in the UPSERT operation. The word “upsert” is a combination of update and insert, and it works as follows:
- If a record with the matching External ID value already exists in Salesforce → Salesforce updates it.
- If no record with that External ID value is found → Salesforce inserts a new record.
This eliminates the need to first query for existing Salesforce Record IDs before running an update — making integrations dramatically simpler and more reliable.
Practical Example
Suppose you have a financial ERP system that tracks customers with its own ID system (e.g., FIN-00123). Without an External ID, every time you want to update data in Salesforce from this ERP, you would need to:
- First export data from Salesforce to get the 18-character Record IDs.
- Manually match them to your ERP records.
- Then run your update.
With an External ID field (e.g., ERP_Customer_ID__c containing FIN-00123), you can simply run an upsert against that field directly. Salesforce handles the matching automatically — no manual ID lookups required.
“External ID fields are the backbone of reliable, repeatable Salesforce data integrations.”
Real-World Use Cases of External ID in Salesforce
Here are the most common scenarios where External IDs prove invaluable:
ERP Integration
Sync customer and product records between SAP, Oracle, or Microsoft Dynamics and Salesforce without manual ID matching.
Marketing Automation
Link Salesforce leads and contacts with campaigns in Marketo, HubSpot, or Pardot using a shared unique identifier.
CRM Migration
When migrating from another CRM (e.g., HubSpot, Zoho), preserve legacy IDs in an External ID field for full traceability.
E-commerce Sync
Map Salesforce order and product records to SKUs and order numbers from Shopify, Magento, or WooCommerce.
Data Warehouse Integration
Cross-reference Salesforce data with records in Snowflake, BigQuery, or Redshift using consistent external keys.
Support System Linking
Link Salesforce cases to tickets in Jira, ServiceNow, or Zendesk for unified customer support visibility.
Limits and Considerations
Before implementing External IDs in your org, keep these key limits and rules in mind:
- 25-field limit per object: Each Salesforce object supports a maximum of 25 External ID fields. Custom fields marked as Unique also count toward this same limit. So: (Unique fields + External ID fields) ≤ 25 per object.
- Custom fields only: You cannot designate a standard Salesforce field as an External ID. You must create a custom field.
- Data type restrictions: Only Text, Number, Email, Auto Number, and Text (Encrypted) are supported. All other types are unsupported.
- Case sensitivity is optional: By default, External ID matching is case-insensitive. Case sensitivity is only enforced when the Unique attribute is also enabled with that option checked.
- Automatic indexing: Salesforce automatically indexes External ID fields, which improves query performance — especially on large datasets.
Best Practices for Using External ID in Salesforce
- Always combine External ID with Unique — This prevents multiple records from accidentally sharing the same external identifier, which would cause import errors or incorrect UPSERT behavior.
- Name your field clearly — Use descriptive names like
ERP_Account_ID__corLegacy_CRM_ID__cso admins and developers instantly understand the field’s purpose. - Document the source system — Add a Description and Help Text to the field explaining which external system populates it and what format the values follow.
- Protect field-level security — Restrict edit access so only integration users or admins can modify it. Regular users should not be overwriting External IDs accidentally.
- Validate format consistency — If your external IDs follow a specific format (e.g., always 10 digits), consider using Validation Rules to enforce that format on the Salesforce side.
- Plan for the 25-field limit early — Audit your External ID and Unique field usage per object to avoid hitting the limit unexpectedly.
- Test UPSERT operations in a Sandbox first — Always validate your integration logic in a Salesforce Sandbox before running upserts in Production, especially for large data volumes.
Frequently Asked Questions (FAQ)
What is External ID in Salesforce?
An External ID in Salesforce is a custom field with the External ID attribute enabled. It stores unique record identifiers that come from systems outside of Salesforce, allowing seamless data integration and synchronization between Salesforce and other platforms like ERPs, CRMs, or marketing tools.
How many External ID fields can an object have?
Each Salesforce object can have up to 25 External ID fields. Custom fields marked as Unique also count toward this 25-field limit. So (Unique fields + External ID fields) must be ≤ 25 per object.
What is the difference between External ID and Record ID in Salesforce?
A Record ID is an automatically assigned 15 or 18-character unique identifier generated by Salesforce for every record. An External ID is a custom field you create to store a unique identifier from an external system. Record IDs are meaningful only within Salesforce, whereas External IDs bridge Salesforce with outside systems.
Is External ID the same as Unique in Salesforce?
No. Unique is a field setting that prevents duplicate values within Salesforce. External ID is a separate attribute that links the field to identifiers from outside Salesforce and enables indexing and UPSERT operations. They serve different purposes, but can — and often should — be applied to the same field simultaneously.
Can a standard Salesforce field be set as External ID?
No. Only custom fields of the supported types (Text, Number, Email, Auto Number, Text Encrypted) can be designated as External ID fields. Standard Salesforce fields do not support the External ID attribute.
Does marking a field as External ID automatically index it?
Yes. When you mark a custom field as an External ID, Salesforce automatically indexes that field. This makes searches and filters on that field faster and more efficient, especially with large data volumes.
Final Thoughts
External ID in Salesforce is not just a data field — it’s a strategic tool that sits at the heart of every Salesforce integration. Whether you’re migrating data from a legacy system, syncing records with an ERP, or running nightly UPSERT jobs from a data warehouse, the External ID field is what makes it all reliable and scalable.
As a Salesforce Admin, mastering External IDs means you can architect cleaner, faster, and more maintainable integrations — without writing a single line of Apex code. It’s a concept that frequently appears in the Salesforce Administrator Certification exam, and understanding it deeply will set you apart in any admin role.
Ready to Master Salesforce and Get Certified?
If this guide gave you clarity on External IDs, imagine what a full, structured Salesforce Admin course could do for your career.
The Salesforce Admin Certification Course at MyTutorialRack covers everything you need to pass the Salesforce Administrator exam and land your first admin role:
- Â Salesforce Admin Certification exam prep
- Data Management & Integration (including External IDs, UPSERT, Data Loader)
- Security model, profiles, roles & permission sets
- Automation tools: Flows, Process Builder, Approval Processes
- Reports, Dashboards & Analytics
- Step-by-step video lessons with hands-on exercises
- Expert-led training with career support
Join thousands of learners who have already started their Salesforce career journey with MyTutorialRack.




