OBLYTECH Logo
OBLYTECH Logo

Salesforce Validation Rules Without Breaking Integrations

Keep Salesforce validation rules compatible with integrations by separating required business checks from approved exceptions. Scope rules to the records and changes that matter, use a custom permission for a justified bypass, and test representative loads as the integration user. Check rejected rows and saved data before enabling the rule in production.

Define what Salesforce validation rules should protect in integrations

Start with the business requirement behind the rule. Does an account need a customer reference before creation, before activation, or before billing? Those are different checkpoints. Requiring information before its owning system can supply it creates a conflict that a broader permission will conceal rather than resolve.

Write a short contract for each proposed check: the object, field, invalid condition, applicable lifecycle stage, responsible data owner, and correction route. Add which systems create and update that field. Use this contract during Salesforce configuration and customization so a formula change follows an agreed process.

Separate missing information from information that must be rejected. A missing optional enrichment value might be a work queue item. An invalid identifier used to match customers may need to block the transaction. Ask what downstream action becomes unsafe if the record is accepted, and name who can authorize an exception.

For an illustrative account feed, assume a custom text field named Customer_Reference__c. The proposed requirement is that new accounts and changes to that reference cannot leave it blank. This is an example design, not an assertion that this field exists in your organization.

Reduce accidental failures before adding a bypass

A validation rule blocks the save when its error condition evaluates to true. A formula checking a blank reference without considering the change can therefore catch an unrelated edit to an older incomplete account. Decide whether that is intended before treating the integration as the problem.

ISNEW() identifies record creation. ISCHANGED(field) compares the current and previous field values; it returns false for fields on a newly created record. Combining the two can cover creation and subsequent edits without requiring an unrelated update to repair historical data.

For the example requirement, the core condition is AND(OR(ISNEW(), ISCHANGED(Customer_Reference__c)), ISBLANK(Customer_Reference__c)). An existing account with a blank reference can receive an unrelated update, while a new blank account or a change that clears its reference meets the error condition.

This design deliberately permits some historical incompleteness. Record that decision and pair it with a cleanup queue. If the requirement instead applies before an account enters a particular business state, design around that transition and test the transition explicitly. Do not transplant a field-change condition into a rule protecting a different obligation.

Review the timing with the owner of Salesforce sales workflow design. A rule should protect the point where information becomes necessary without forcing an earlier system to invent a placeholder.

Give an integration user a narrowly defined exception

Use a custom permission where an approved exception remains necessary. A permission reference in the formula separates the exception from a particular username or user ID. Assigning that permission through a dedicated permission set makes the intended recipients easier to review than a list embedded in formula text.

For this example, create a custom permission named Bypass_Customer_Reference_Check and add it to a dedicated permission set. Assign that set to the intended integration user after reviewing the business reason. In Setup, Custom Permissions and Permission Sets provide the relevant configuration areas; the permission set’s Custom Permissions section holds the permission.

The illustrative formula becomes AND(NOT($Permission.Bypass_Customer_Reference_Check), OR(ISNEW(), ISCHANGED(Customer_Reference__c)), ISBLANK(Customer_Reference__c)). The bypass condition belongs inside the outer AND. With the permission present, this rule’s error condition is false. Without it, the creation or change check still applies.

Name the exception for the requirement it bypasses. Do not automatically reuse it for checks protecting different fields or business risks. Document the permission’s owner, purpose, assigned identity, and review trigger. Check the formula and assignments in your own organization before activation.

Before approving a permanent bypass, decide how the integration will demonstrate equivalent quality controls. If it cannot, change the data contract or correction process. Set out the rule inventory, exception register, and acceptance evidence that business and integration owners must review.

Build a sample load with explicit expected results

Create synthetic records in a test environment and write the expected outcome before running the load. Keep the source row identifier, intended operation, starting values, submitted values, executing identity, expected acceptance, and expected saved state together. The result needs to explain the decision, not just show a successful job.

For the account example, include these cases with the bypass absent:

  • A new account with a populated reference should pass this check.
  • A new account with a blank reference should fail this check.
  • An existing populated reference changed to blank should fail this check.
  • An older blank reference left unchanged during another field update should pass this check.
  • A reference replaced with another populated value should pass this check.

Repeat the blank-reference cases with the approved permission assigned. Expect this rule to permit them, then inspect the saved records. Add a negative control: a user without the permission must still encounter the reference check. Other rules and access controls can affect the final save; record their errors separately.

Include an unrelated validation failure to establish that the exception has not become a catchall in your configuration. Add an explicit blank value and an omitted field as separate payload cases. Keep the operations used by the real connector in scope, including both creation and update paths when it uses an upsert.

Use the actual integration identity and representative mappings. An administrator’s manual edit does not prove that the connector submits the same fields or has the same permission assignments. Resolve identity, field ownership, and retry design through Salesforce integration architecture before accepting the test results.

For help planning this work, see Salesforce implementation.

Reconcile rejected rows and release the change

Run a deliberately mixed sample containing expected passes and failures. Capture the response against each source row. Document the transaction and partial-success behavior of the connector you use; do not infer it from another loading tool. Reconcile submitted, saved, rejected, and unresolved records rather than relying on the job’s headline status.

Give the rule an error message that identifies the missing requirement and a stable reference your support team can recognize. Route deterministic validation failures to correction instead of scheduling the unchanged payload repeatedly. Keep sensitive field values out of broad operational logs while retaining enough identifiers for authorized investigation.

Keep a small release record for the integration operator: the rule name, deployment reference, expected error, correction queue, and escalation owner. Include evidence that the rule still rejects an ordinary user’s invalid update. This lets the person responding to a failed overnight load distinguish an intended rejection from a new defect without guessing which exception was approved.

Correct one rejected row and resubmit it through the intended recovery route. Verify both the corrected value and the absence of unintended duplicate business records. Agree how the source records success, how unresolved items remain visible, and who owns a failed correction.

Link historical exceptions to Salesforce data quality and migration work. Otherwise, an approved bypass can leave incomplete records circulating without a cleanup owner.

Set a monitoring window and a named responder. If unexpected rejection rises, preserve the failing payload and rule version before changing anything. Removing a bypass also deserves a sample test because it changes which records the integration can save.

Questions about operating validation exceptions

What should happen when an integration account is replaced?

Treat the identity change as a new acceptance event. Review which exceptions the replacement needs, approve its assignments, and retire the old account’s access through your access-management process. Keep the authorization record separate from the connector credential so rotating access does not obscure the business decision.

Can two feeds share the same bypass permission?

Consider sharing when both feeds have the same exception and data-quality obligations. If one feed requires a broader exception, separate the permissions. Record the dependencies so a later formula change does not silently expand the other feed’s authority.

Who should approve a request to skip a check?

Use a business owner accountable for the data requirement alongside the technical owner accountable for delivery. Ask them to approve the accepted risk, compensating check, and correction owner. An urgent support request explains the pressure but does not define an acceptable data standard.

How should test evidence be kept without retaining customer data?

Keep synthetic payloads, formula versions, expected decisions, redacted responses, and reconciliation totals. Store any production identifiers needed for investigation in an access-controlled operational record. The reusable regression pack should explain how to reproduce the decision without exposing a customer’s details.