Skip to content
Suggest a correction

Check that the billing address is complete

Example4 min read

Create a Record Health Check that passes only when an Account’s Billing City, Billing State, and Billing Country are all populated. When a part is missing, the card names it in Found, so the user knows what to add. The example uses the Verify with a formula Evaluation Type.

All three values are fields on the Account that is open, so one Salesforce formula can require them together. Use a Check rather than a Validation Rule because an incomplete address should be fixed before tax or territory review, not block every other Account update.

  • Install Record Health Check, and assign yourself Record Health Check Admin and the Salesforce Customize Application permission.
  • Confirm that the people who will use the card can read Billing City, Billing State, and Billing Country.
  • If your org uses State and Country/Territory Picklists, decide whether the formula should use BillingStateCode and BillingCountryCode instead. Both pairs are available in those orgs.
  • Add Billing Street or Billing Zip/Postal Code to the formula if your process requires them.

You can add the Check to an Account Check Set you already have. To create one, open Setup → Custom Metadata Types, select Manage Records next to Record Health Check Set, select New, enter these values, and save. Leave other fields at their defaults.

FieldValue
LabelAccount Data Quality
ObjectAccount
Record Health Check Set NameAccount_Data_Quality
ActiveCleared until validation succeeds
Card TitleAccount Data Quality
Card SubtitleConfirm the billing address is complete for tax and territory review.
When Checks RunWhen the user clicks Run
Found/Expected DisplayShow on demand

Open Setup → Custom Metadata Types, select Manage Records next to Record Health Check, select New, enter these values, and save.

FieldValue
LabelBilling Address Is Complete
Check SetAccount Data Quality
Evaluation TypeVerify with a formula
Record Health Check NameBilling_Address_Is_Complete
Evaluation Order20
ActiveCleared until validation succeeds
Pass ConditionAND(NOT(ISBLANK(BillingCity)), NOT(ISBLANK(BillingState)), NOT(ISBLANK(BillingCountry)))
Check TitleBilling address is complete
Check DescriptionPasses when Billing City, Billing State, and Billing Country are all populated.
Message When Failed{!record.Name fallback="This Account"} has an incomplete billing address.
Fix MessageAdd each billing address part named in Found, then run the Check again.
Failure SeverityCritical
Action LabelEdit billing address
Action URL/lightning/r/Account/{!record.Id}/edit
Display: Found FormulaIF(ISBLANK(BillingCity), "City missing. ", "") & IF(ISBLANK(BillingState), "State missing. ", "") & IF(ISBLANK(BillingCountry), "Country missing.", "")
Display: Expected Formula"City, State, and Country populated"

How the formulas work:

  • Pass Condition decides the result. AND() is true only when all three NOT(ISBLANK()) tests are true.
  • Display: Found Formula only builds the text the card shows. IF() adds a phrase for each missing part, and & joins the phrases. On a complete address it returns no text.
  • Display: Expected Formula is fixed text, written in quotation marks because it is a formula.
  1. Run the Validate Record Health Check Configuration Flow action, as described in Validate configuration before activation, and correct every error.
  2. Activate the Check, then the Check Set.
  3. Add the Record Health Check component to the Account record page, select Account Data Quality (Account_Data_Quality), and activate the page.
  4. Assign Record Health Check Card User to the users who test the card.

Use sandbox Accounts that you can edit. Select Run on the card for each case.

Billing CityBilling StateBilling CountryResult on the cardFound
PopulatedPopulatedPopulatedPassNo value, because nothing is missing
BlankPopulatedPopulatedFailedCity missing.
PopulatedBlankBlankFailedState missing. Country missing.

The label is Failed because Failure Severity is Critical. Run one failing case as a user who cannot read Billing Country; the row shows Unable to Check.

A failed row shows Failed, the message with the Account Name, the fix message, an Edit billing address link, and Found and Expected values. With Found/Expected Display set to Show on demand, failed rows show Found and Expected without any action from the user.

What you seeWhat to check
A complete address failsWhether your org stores State and Country in BillingStateCode and BillingCountryCode instead.
Found does not name every missing partThe Display: Found Formula matches the table exactly, including every quotation mark.
Unable to CheckThe user can read all three address fields.
The Check Set is not in Lightning App BuilderThe Check Set is active and its Object is Account.