CRM Validation Rule Migration: Test Accepted Records

CRM validation rule migration should preserve which records can be saved, which must be rejected, and why. Rebuild each important rule from its business meaning, then test valid and invalid records through the routes your team will use. A matching import success count cannot prove that the right records passed.
Start with rules that protect contracts, discounts, handoffs, and reporting. This guide fits CRM administrators and operations teams replacing a system with existing data controls. Our eight-case exercise below accepts four records under both versions of a rule, yet two individual decisions differ. Use the CRM migration checklist for the wider cutover sequence.
CRM validation rule migration starts with a decision contract
A validation rule is a decision about a proposed write. Document the object, fields, condition, operation, writer, expected outcome, and error message. Include what happens when a value is missing and whether the condition depends on the previous state of the record.
An invented rule such as “won deals need a contract reference” still leaves several decisions open. Does a string containing only spaces count as a reference? Does the rule apply to historical won deals when someone changes the phone number? Must an imported deal have the reference immediately, or will a later load attach it? Answer those questions before translating syntax.
| Contract item | Example decision | Case to save |
|---|---|---|
| Business condition | Won deals require a nonblank contract reference | Won deal with a missing reference fails |
| Blank meaning | Spaces alone count as blank | Three spaces fail |
| Numeric boundary | Discount is between 0 and 20 inclusive | Both 0 and 20 pass |
| Missing number | Missing discount is permitted | Blank passes without becoming zero |
| Operation | Apply on creates and updates | Existing deal changed to won fails without reference |
| Error ownership | Sales operations resolves contract errors | Failed row enters a named queue |
Store the rule name beside stable field identifiers. Labels can change during migration. A rule referring to “status” needs the destination field and internal stage value, not just the word shown on screen. Resolve value mapping with the CRM picklist cleanup process before comparing rule outcomes.
Keep calculated outputs separate from acceptance decisions. The CRM formula migration guide covers calculation behavior. Here, the question is whether the resulting write should be allowed at all.
Separate field requirements from enforcement routes
A required field on a form, a conditional stage requirement, a property format rule, and an object validation expression serve different purposes. Record each control independently. A rep seeing an asterisk beside a field does not prove an import or integration rejects a missing value.
Salesforce Trailhead's validation rule lesson explains that a validation expression returning true identifies invalid data. When translating a rule into a system that describes an allowed condition, check the direction of the logic. Copying the expression without its meaning can reverse the outcome.
Build a route matrix for the controls that matter: manual creation, manual update, bulk import, API integration, workflow update, and form submission. Mark each cell with an observed result and the identity used. An administrator's successful test is insufficient if sales representatives or the production integration use different permissions.
HubSpot's property validation documentation distinguishes enforcement paths. It describes validation on edits and imports, but lists workflows, chatflows, meeting scheduling pages, and legacy-editor forms as exceptions. Updated-editor form submissions enforce the rules. It also states that existing values are not retroactively formatted. Use those distinctions when selecting the pilot routes.
For integration identities and allowed writes, pair the matrix with the CRM integration permissions checklist. Decide who can correct a rejected value and who can change the rule itself. Those are separate responsibilities.
An eight-case acceptance exercise
We wrote and ran a Python exercise using eight invented deal writes. The intended contract requires a nonblank contract reference for won deals and permits a missing discount or a discount from 0 through 20 inclusive. The candidate implementation makes two mistakes: it accepts a reference containing spaces and rejects a zero discount.
Download the runnable Python exercise and complete results. Run the script with Python 3 to reproduce the decisions. It compares two local functions; these are authored business rules, not observations of a vendor account.
| Case | Input detail | Intended outcome | Candidate outcome |
|---|---|---|---|
| V01 | Open, no reference, blank discount | Accept | Accept |
| V02 | Won, C-2 reference, discount 10 | Accept | Accept |
| V03 | Won, missing reference, discount 10 | Reject: contract | Reject: contract |
| V04 | Won, spaces-only reference, discount 10 | Reject: contract | Accept |
| V05 | Open, no reference, discount 0 | Accept | Reject: discount |
| V06 | Open, no reference, discount 20 | Accept | Accept |
| V07 | Open, no reference, discount 21 | Reject: discount | Reject: discount |
| V08 | Won, missing reference, discount -1 | Reject: both | Reject: both |
Both versions accept four records. V04 and V05 exchange places in the accepted set, leaving the total unchanged. Comparing only the count would approve this candidate. Comparing decisions by case ID catches both defects.
V08 also shows why a rejected-row count does not describe the cleanup workload. One record violates two controls. Preserve all expected reasons in the acceptance specification, then document what the destination returns when several rules fail. A generic “invalid record” message gives the owner less information than the two correction tasks actually require.
Take the same approach to your pilot. Prepare expected outcomes before running the import, preserve a stable external ID, and compare the accepted IDs, rejected IDs, and reasons. Investigate an unexpected acceptance as carefully as an unexpected rejection. An import that refuses a valid deal creates visible work; an import that accepts a bad approval can remain unnoticed.
CRM validation rule migration needs boundary cases
For every numeric limit, include the boundary and values immediately on either side. For a date condition, test equality and the adjacent dates. For text, include an empty value, spaces, a valid value, and the maximum intended length. Choose examples from the rule's actual business definition.
Test transitions as well as final states. A deal created as open and later moved to won can exercise different logic from a deal imported as won. Include a valid correction after rejection and an unrelated edit to an older record. If historical exceptions are permitted, define which records qualify and how that decision is retained.
Avoid cleaning away the very examples needed to test rejection. Keep a small controlled set of invalid rows in the rehearsal dataset and give each an expected reason. Run these in a CRM sandbox rehearsal, alongside valid neighboring cases, before production cutover.
When rules depend on amounts or dates, use the same units and representations as the destination. The CRM date migration checks help separate missing dates from intentional clears. The CRM line-item migration checks help establish which amount a discount or approval condition should evaluate.
Decide what to do with rejected legacy records
Salesforce's import notes state that validation rules run before import and records failing validation are not imported. Treat those rejected IDs as an explicit migration cohort. A completed import job can still leave required records outside the destination.
Classify each rejected row as a source correction, mapping defect, rule defect, or approved historical exception. A missing contract might require sales review; a stage label translated incorrectly requires a mapping repair. Do not weaken the rule to solve both problems at once.
Assign a responsible person, correction action, and retry batch to every cohort. Keep the original source value and rejected payload so a “fix” can be reviewed. Record which destination records already exist before retrying; an import intended to update existing records should not create a second copy after an error.
If a phased load needs temporary exceptions, define the exact records, writer, allowed operations, deadline, and reconciliation required to close them. Give the migration lead a list of remaining exceptions before reopening normal writes. A general bypass with no closure condition leaves the new CRM operating under a different data contract.
Use CRM field ownership to decide which system supplies the correction when two integrations disagree. Add recurring exception review to the CRM data hygiene audit after cutover.
Release rules with a measurable acceptance gate
Approve the pilot when every planned case has the expected outcome through each required route, every imported record is accounted for, and every approved exception has an owner. Keep the accepted and rejected IDs with the batch. Comparing an overall percentage loses the evidence needed to explain individual discrepancies.
Before widening the load, test a corrected retry, a second submission of the same batch, and the first ordinary edit after migration. Check the saved values and the next workflow action. An accepted row can still be routed incorrectly if a dependent field was transformed or defaulted.
Stop the rollout when a required record is accepted incorrectly, a valid business action is blocked, or rejected rows cannot be traced to their source IDs. Repair the rule or mapping and rerun the affected cases. Keep downstream actions paused for the pilot cohort until those checks pass.
The acceptance pack should contain the decision contracts, route matrix, expected cases, actual outcomes, error mapping, and unresolved exception list. Store it with the field map and import logs so the team can reuse it when a later rule change is proposed.
Frequently Asked Questions
Do CRM validation rules migrate with a CSV file?
A CSV carries field values. Recreate the required controls in the destination and test their behavior separately. Preserve the original expressions and business definitions in the mapping pack so the destination rule can be checked against the intended decisions.
Should validation rules be disabled for an import?
First identify why the rows fail. Correct bad data and mapping defects before changing a control. If an approved migration phase needs an exception, limit it to defined records and operations, assign an owner, and reconcile the exception cohort before normal use resumes.
Why can matching import totals hide a rule defect?
One invalid record can be accepted while one valid record is rejected, leaving the accepted count unchanged. Compare expected decisions by stable record ID and retain the rejection reasons. The eight-case exercise above demonstrates that exact swap.
What should a validation rule migration test include?
Include valid cases, invalid cases, blanks, boundaries, multiple simultaneous errors, creates, updates, and corrected retries. Run the cases through the actual import, user, and integration routes required by the rollout, then compare saved values and dependent actions.
Choose a CRM using the rules your team needs
Bring a small acceptance pack to the HubSpot vs Salesforce comparison. Salesforce is a strong fit when complex object logic justifies dedicated administration. HubSpot fits teams prioritizing a connected sales and marketing workflow. Demonstrate your required enforcement paths in either system before committing to the implementation plan.
For a simpler sales process, use Pipedrive vs HubSpot to weigh pipeline-focused work against broader customer operations. A team with a few clear field requirements should avoid buying complexity it will not maintain. A team whose approvals depend on several records should make those rules a purchase criterion and budget for their ongoing ownership.


