Skip to content
Back to articles

Data quality · December 4, 2026

Do Salesforce Duplicate Rules See Before-Save Flow Changes?

Test Contact email normalization, duplicate blocking and Data Loader errors using Salesforce save order.

Yes. On the normal Salesforce save path, a duplicate rule runs after a before-save record-triggered flow. If your Contact flow assigns a lowercased email to the triggering record, the duplicate rule evaluates the current record values at its step. A before trigger can still alter the value between those steps, so check for other automation before attributing the result to Flow alone.

Before-save Flow and before triggers run before custom validation and duplicate rules.
Selected stages for a Contact insert. A blocking duplicate rule stops the save.

Build a test that shows which value changed

In a sandbox, create a Contact with jane.doe@example.com. Set up a before-save Contact flow that assigns LOWER({!$Record.Email}) to the triggering record’s Email. Use the before-save versus after-save guide to choose Fast Field Updates. Activate an exact email matching rule and a Contact duplicate rule that blocks creates. Check the rule’s scope and record-level security setting using the same import user you will use for verification.

  1. Insert a Contact with a new mixed-case address through Data Loader. Query the saved record to verify the normalized value. A successful insert helps establish that the flow ran.
  2. Insert a Contact with the existing address in mixed case. Check the failed row for the duplicate-rule error and confirm the Contact was not inserted.
  3. Try a blank address separately. If the example’s custom validation rule rejects blanks, that earlier check can stop the transaction before duplicate detection.
  4. Run the same test with the actual import mode and permissions you plan to use. Preserve the success and error files by run so you can retry only records that failed after correcting the cause.

Separate save order from matching behavior

A mixed-case row being blocked does not, by itself, prove that the flow caused the match. Matching rules can apply their own normalization. Run a control with the flow inactive in a sandbox, or use a separate test field and a deliberate transformation whose effect you can observe. When testing a custom matching rule, verify the populated target field on existing Contacts as well. An insert flow changes the incoming row. It does not update the values already stored on other Contacts.

For production imports, make a clear decision about blocked rows. If the job is meant to update known records, identify them using trusted IDs or a suitable external ID. If the source may contain competing Contacts, send failures to a review queue with a clear owner. Do not rerun an entire successful import just because a subset was blocked.

Salesforce order of execution documents the sequence, including the steps skipped when a duplicate rule blocks the record.

Related articles

Browse all articles