Salesforce Decode
Salesforcedecode
Back to questions
ApexAdvancedbatchcompliancedml

Architect delete and anonymize batch for GDPR with Apex DML limits

Real World Scenario

GDPR erasure request requires deleting Contact and cascading PII across 15 related object types for 50k contacts in single request.

Expected Answer

• Orchestrator batch deletes children before parents respecting MD order • Anonymize vs hard delete per field classification policy • Batch scope tuned for DML rows limit per execute • Audit Erasure_Request__c tracks progress per Contact Id • without sharing erasure service with legal approval documentation • Finish notifies privacy team with completion certificate data • Test erasure on sandbox clone verifying no orphan PII

Follow-Up Questions & Answers

Click to expand — each follow-up includes a direct, interview-ready answer

Direct answer: Orchestrator batch deletes children before parents respecting MD order Also consider: Anonymize vs hard delete per field classification policy In practice: Batch scope tuned for DML rows limit per execute Optimize for scale and operational observability.

Architect Perspective

GDPR erasure is multi-batch workflow—single synchronous delete is impossible at enterprise scale.