Let me walk through all three technical aspects to get your partner import working correctly.
Account Relationship Fields:
For partner account hierarchies, use the standard ParentId field on the Account object - this is the correct approach. The Account Relationships object is for complex many-to-many scenarios (like a partner that resells for multiple manufacturers). Your use case is simple parent-child hierarchy which ParentId handles perfectly.
The ‘Account Relationship Type’ error is likely a custom required field on your Account object. Check Setup → Object Manager → Account → Fields and Filters to find required fields. Common values for partner accounts: ‘Partner’, ‘Reseller’, ‘Distributor’, ‘VAR’.
External ID Usage:
Your External ID setup is correct conceptually, but Data Loader requires specific syntax for relationship lookups. Here’s the proper configuration:
CSV Column Header Format:
Parent:Account_Number__c (assuming Account_Number__c is your External ID field)
CSV Data Example:
Account Name,Account_Number__c,Parent:Account_Number__c,RecordType
Partner Corp,PART-001,CORP-12345,Partner
Partner Sub,PART-002,CORP-12345,Partner
The colon syntax tells Data Loader: “Look up the parent Account record where Account_Number__c equals this value, then use that record’s ID for ParentId.”
Critical: The External ID field must be:
- Marked as ‘External ID’ (Setup → Account Fields → Account Number → Edit)
- Marked as ‘Unique’ to prevent duplicates
- Populated on ALL parent accounts before importing children
Reference Data Validation:
Your “reference not found” errors indicate data quality issues. Here’s the validation process:
-- Step 1: Export existing parent accounts
SELECT Id, Name, Account_Number__c
FROM Account
WHERE Account_Number__c IN ('CORP-12345', 'CORP-12346', ...)
-- Step 2: Compare with your import CSV
-- Look for: case mismatches, extra spaces, missing records
Root Cause Analysis:
Your error “CORP-12345 does not match any Account” means either:
- That Account Number doesn’t exist in Salesforce (parent not imported yet)
- Case sensitivity issue (CORP-12345 vs corp-12345)
- Hidden characters (spaces, tabs) in CSV: "CORP-12345 " vs “CORP-12345”
- External ID field not properly configured as unique External ID
Step-by-Step Fix:
- Verify Parent Accounts:
Data Loader → Export → Account
Filter: Account_Number__c != null AND RecordType.Name = 'Corporate'
Export fields: Id, Name, Account_Number__c
Save as: parent_accounts_verification.csv
- Clean Your Import CSV:
- Open in Excel, apply TRIM() function to Account Number columns
- Ensure exact case match with existing parent External IDs
- Remove any hidden characters
- Verify every Parent Account Number exists in step 1 export
- Configure Data Loader Mapping:
Field Mapping in Data Loader:
Account Name → Name
Account_Number__c → Account_Number__c (External ID)
Parent:Account_Number__c → ParentId (Relationship lookup)
Account_Type__c → Account_Type__c
Partner_Relationship_Type__c → Partner_Relationship_Type__c (if required)
- Import Process:
- Test with 5 records first to validate mapping
- Review success.csv and error.csv files
- If successful, proceed with full 800 records
- Use Update operation if any records need correction
- Post-Import Validation:
SELECT Id, Name, Parent.Name, Account_Number__c
FROM Account
WHERE RecordType.Name = 'Partner'
AND ParentId = null -- Should return zero rows
For the Required Field Error:
Identify all required fields on Account object:
- Setup → Object Manager → Account → Fields & Relationships
- Filter by “Required”
- Add columns to your CSV for: Partner_Relationship_Type__c (or similar)
- Use appropriate picklist values
Common Partner Portal Required Fields:
- Partner Type: ‘Reseller’, ‘VAR’, ‘Distributor’
- Partner Tier: ‘Gold’, ‘Silver’, ‘Bronze’
- Portal Access: TRUE/FALSE
- Contract Status: ‘Active’, ‘Pending’, ‘Inactive’
This systematic approach addresses External ID relationship mapping, proper reference data validation, and Account Relationship field usage. Your 800 partner accounts should import cleanly once the parent External IDs are verified and the CSV syntax matches Data Loader’s relationship lookup format.