Skip to content

Check Contact emails for a placeholder domain

Setup reference: Query Check configuration

Create a Query Check that reviews Contact Email values related to an Account. It passes only when every populated email avoids a confirmed placeholder domain such as @example.com.

The Check reviews a list of values on related Contact records. Verify with a query can ignore blank emails, compare every populated value, and skip Accounts with no visible Contacts.

  • Replace @example.com with a placeholder value confirmed from your own data policy.
  • Confirm whether matching should be case-sensitive and whether more than one pattern is required.
  • Create the Contact-count prerequisite first.
  • Confirm intended users can read Contact Account and Email fields.
  • Save new configuration inactive and validate it before activation.

Use Account Related Record Review, or create an Account Check Set that runs on click, shows Found/Expected on demand, and remains inactive until validation succeeds.

Open Setup → Custom Metadata Types → Record Health Check → Manage Records, select New, and enter:

Salesforce fieldValue
LabelContact Email Avoids Placeholder Domain
Record Health Check NameContact_Email_Avoids_Placeholder
Check SetAccount Related Record Review
Check TitleContact emails exclude placeholder domain
Evaluation TypeVerify with a query
Source QuerySELECT Email FROM Contact WHERE AccountId = {!record.Id}
Source Query FieldEmail
How To Read Query ResultsEvery record passes
Comparison OperatorDoes not contain text
Expected Value Comes FromFixed value
Expected Value (Fixed)@example.com; replace before activation
If Query Finds No RecordsSkip
If Field Value Is EmptyIgnore the record
Max Query Rows200
Display: Found Text{!rhcResult.failedRecordCount} of {!rhcResult.totalRecordCount fallback="0"} contact emails use the placeholder domain
Display: Expected TextNo contact email uses the confirmed placeholder domain
Prerequisite CheckHas At Least One Contact
Failure SeverityWarning
Message When FailedOne or more Contacts use a placeholder email domain. Replace only with a verified address.
Fix MessageReview the related Contacts and follow your data-correction policy.
Action LabelReview contacts
Action URL/lightning/r/Account/{!record.Id}/related/Contacts/view
Evaluation Order100
ActiveUnchecked until validation succeeds
  1. Replace the sample domain with the confirmed value.
  2. Run the configuration-validation Flow.
  3. Correct every error, then activate the prerequisite, this Check, and the Check Set.
  4. Test from the Account page with Record Health Check Card User.
Visible ContactsEmail valuesExpected result
NoneNot applicableSkipped by the prerequisite
OneBlankPass; the blank row is ignored
TwoBoth verified domainsPass
TwoOne contains the placeholder textWarning

Also test different letter casing and subdomains if your policy distinguishes them.

The card reads the visible query result and compares it with the configured expected value.

Result detailMeaning
PASSThe query result satisfies the configured comparison.
FAILThe query result does not satisfy the comparison, and the card shows the configured guidance.
SKIPPEDThe Check does not apply or a configured prerequisite did not pass.
FoundThe normalized row, list, or aggregate value returned by the query.
ExpectedThe configured fixed value or evaluated expected formula.
What you seeCheck this first
The sample domain is still displayedDo not activate until both the fixed value and display text match policy
Accounts with no Contacts behave unexpectedlyConfirm the prerequisite and its evaluation order
Blank Email failsConfirm If Field Value Is Empty is Ignore the record
A known placeholder is missedConfirm the exact stored text, comparison behavior, and user record access