Salesforce’s standard lead export often misses custom fields and provides limited access to historical data, giving you an incomplete picture of your lead database and its evolution over time.
While comprehensive audit trail data isn’t accessible through API, here’s how to export the most complete lead dataset possible, including all custom fields and available historical information.
Export comprehensive lead data using Coefficient
Coefficient significantly improves field coverage over standard exports by accessing all lead fields through Salesforce’s API. You can capture all standard fields, custom fields, related object data, and available historical tracking information.
How to make it work
Step 1. Set up your primary lead import with all available fields.
Connect Coefficient to Salesforce and use “From Objects & Fields” to select the Lead object. Choose all standard fields like Name, Company, Email, Phone, Status, and Source, plus any custom fields your organization has created, regardless of page layout visibility.
Step 2. Include related object data for complete context.
Add related account, contact, and campaign information through lookup relationships. Include fields like Account.Name, Account.Type, Campaign.Name, and Contact.Email to capture the full context around each lead without separate exports.
Step 3. Create a separate import for field history tracking.
If field history tracking is enabled on specific lead fields, set up a separate import from the LeadHistory object. This captures historical values for tracked fields, showing how lead data has changed over time.
Step 4. Import related activity history for interaction tracking.
Create additional imports for Task and Event objects filtered by lead relationships (WhoId = Lead.Id). This captures all activities, meetings, and interactions associated with each lead, providing a complete engagement history.
Step 5. Use custom SOQL to join historical data with current records.
Write custom queries to combine current lead data with historical information. For example: “SELECT Id, Name, Company, (SELECT Field, OldValue, NewValue, CreatedDate FROM Histories) FROM Lead” pulls leads with their field change history in a single query.
Get the most comprehensive lead export possible
This approach provides the most complete lead export available through API access, capturing current data, custom fields, and available historical information in one comprehensive dataset. Start building your complete lead database today.