Managing validation rules and automation during large data loads
Key Takeaway
Before you suspend validation rules, workflow rules and triggers for a large data load, decide how each requirement they enforce will still be met. You meet each one either by cleansing the data before the load or by post-processing after it.
Validation rules, workflow rules, triggers and similar automation keep everyday data clean. Because this automation runs on every inserted record, it can slow a large data load, such as one during an Agentforce Manufacturing implementation, to a crawl. The best practice is to plan how each rule's purpose will be met before or after the load, then switch the automation off or bypass it while loading. After the load, you turn the automation back on and finish the deferred work. The load is fast, and data integrity still holds.
Why automation slows large loads
Three kinds of automation matter most during a large load:
- Validation rules check that data meets your business standards.
- Workflow rules automate field updates, email alerts, outbound messages and tasks.
- Triggers manipulate data and perform other actions on insert.
All of these run per record, so during a massive load they can slow inserts to a crawl.
The same practice applies when you restore a large number of records. Temporarily disable the validation rules, workflows and triggers on the relevant objects, which prevents undesired events and shortens processing time.
Automation is not the only per-record cost. Sharing and lookups also add work while records load:
- With a "Private" sharing model, sharing is calculated as records are added. A "Public Read/Write" model lets you defer that work until after cutover.
- Ownership-based and criteria-based sharing rules set up before the load add sharing calculations for matching records.
- Each lookup on an object adds checks during loading.