## TL;DR

The rule is too broad for the data your process legitimately writes. Do not delete the rule; scope it: exclude the integration profile, add a bypass checkbox for system updates, or narrow the formula to the cases it was meant to catch. Then re-run the blocked updates.

## Error

```text
[ {
  "message" : "Stage cannot move backward once the deal is Closed Won",
  "errorCode" : "FIELD_CUSTOM_VALIDATION_EXCEPTION",
  "fields" : [ "StageName" ]
} ]
```

## Steps

1. Identify the rule from its message text in Setup. Expected: the exact rule and its formula.
2. Determine whether the blocked updates are legitimate (data corrections, migrations, agent hygiene). Expected: a yes/no on legitimacy.
3. Add a bypass: a custom checkbox like Bypass_Validation__c that the rule checks, or a profile exclusion for the integration user. Expected: the rule skips when the bypass is set.
4. Have the agent set the bypass flag only for its system updates, never for user-driven edits. Expected: guardrail stays for humans, automation passes.
5. Re-run the blocked updates and then clear the bypass flags. Expected: data fixed, rules intact.

## When to use

- Legitimate updates are rejected by a validation rule.
- An agent hygiene run is blocked by rules written for manual entry.
- Data corrections need to bypass interactive guardrails.

## When not to use

- The data is actually wrong (fix the data, not the rule).
- Trigger errors (different engine).

## Tool compatibility

- Salesforce validation rules; custom bypass fields.
- Agent update jobs.

## Variant phrasings

### rule blocking the integration user

Scope the rule by profile.

### validation too strict for bulk updates

Add a bypass path for system updates.

## Why it happens

Validation rules encode business policy for human workflows. Bulk corrections, migrations, and agent hygiene legitimately violate those policies' letter while honoring their spirit.

## Edge cases

- Bypass checkboxes must default to unchecked and be cleared after use, or they become permanent holes.
- Profile-based bypasses affect every integration on that profile; prefer the checkbox for precision.
- Audit who sets the bypass; it is a privileged action.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_9Z7SpP0ODHpJiglF9zElUw
