ApexAdvancedintegrationbatchdata-quality
Design nightly reconciliation batch comparing Salesforce to external MDM
Real World Scenario
MDM is source of truth for Customer master. Salesforce drifts with 15k mismatched addresses detected monthly by business users.
Expected Answer
• Batch queries Salesforce slice by LastModifiedDate or sync batch Id
• Callout or read MDM export file from middleware per execute chunk
• Diff engine: compare hash of normalized fields not raw string equality
• Write discrepancies to Reconciliation_Exception__c for steward UI
• Auto-fix safe fields; queue manual review for conflicting ownership
• Finish report: matched, fixed, exception counts emailed to data team
• Idempotent: same discrepancy not duplicated on consecutive nightly runs
Follow-Up Questions & Answers
Click to expand — each follow-up includes a direct, interview-ready answer
Main difference: use case and scale. Batch queries Salesforce slice by LastModifiedDate or sync batch Id. Callout or read MDM export file from middleware per execute chunk. Pick based on your integration pattern and team capability. Reconciliation batch is data governance backbone—design before assuming integrations stay synchronized. Optimize for scale and operational observability.
Architect Perspective
Reconciliation batch is data governance backbone—design before assuming integrations stay synchronized.