Bypassing automation and sharing recalculation during bulk loads
Key Takeaway
During a bulk load, turn off or defer the automation and sharing work the load doesn't need, then do that work afterward. Turning rules back on doesn't make them process records already loaded. After you resume deferred sharing calculations, you must also click "Recalculate".
When you load a large volume of records, Salesforce normally runs validation rules, workflow rules, assignment rules, triggers and sharing calculations on every insert. That work can slow a load to a crawl or cause timeouts. So you turn off or defer what the load doesn't need, then do that work afterward so data quality and record access still end up correct.
Loading lean
The guiding strategy is loading lean: load only the data and configuration your business-critical operations need, and load it as fast as possible. A faster load means less data to synchronize at cutover. Non-critical processes can wait until after the load.
Bypassing automation safely has three phases, in this order:
- Analyze and prepare data.
- Disable events for loading.
- Post-process.
The preparation and post-processing phases are what let you turn off validation and enrichment without compromising data integrity or business rules.