Skip to content

Examples you can copy

23 guides

Find a complete, tested Record Health Check configuration for a common Salesforce requirement, and copy it into your org. Each example explains why its Evaluation Type fits, lists every Setup value, shows what users see, and gives passing and failing tests.

These examples are instructions; the package does not install them. The package does install four example Check Sets with 50 Checks, described in Explore the installed example Check Sets. Create your own Check Set before you copy an example, so the configuration belongs to your organization.

Start with where Salesforce stores the information the requirement needs.

The answer depends onEvaluation TypeExamples
Fields on the record, or on a parent record such as the Parent AccountVerify with a formulaFormula examples
Related records, such as Contacts, Opportunities, or CasesVerify with a queryQuery examples
Two counts or two lists from related records that must agreeCompare two queriesCompare two queries examples
Logic that a formula or query cannot expressVerify with ApexApex examples

Choose a formula when it can answer the question; it is the simplest to maintain. Choose Apex only when the other types cannot express the rule, because Apex needs a developer to write and test a class.

ExampleEvaluation TypeWhat it teaches
Check that an Account has a Phone or WebsiteFormulaAccept either of two fields with OR()
Check that the billing address is completeFormulaRequire several fields with AND(), and name the missing ones in Found
Check partner Accounts for a billing countryFormulaSkip records with an applicability formula
Check the parent Account’s headquarters cityFormulaRead a parent record, and link to it
Check that an Account meets a minimum employee countFormulaCompare a number, and show Found and Expected on every row
Check that an Account has at least one ContactQueryCompare a COUNT() with a fixed number
Check that every open Opportunity has a Next StepQueryRequire every returned record to pass
Check that an Account has a significant open OpportunityQueryPass when any record exceeds a value calculated from the Account
Check that proposal-stage Opportunities meet a minimum AmountQueryWrite custom Found and Expected text
Check Contact emails for a placeholder domainQueryIgnore blank values, and depend on a prerequisite Check
Check that the Account Owner is on the Account TeamQueryFind one value in a list returned by a query
Check that the high-priority Case backlog is within a limitQueryCompare with a maximum, and publish an optional Platform Event
Check that every open Opportunity has a Contact RoleCompare two queriesCompare two counts, and handle aggregates that return no rows
Check that open pipeline includes a previously purchased ProductCompare two queriesTest whether two lists share a value
Check that the Account Team includes every open Opportunity ownerCompare two queriesTest whether one list contains every value of another
Check that an Account has recent activityApexConfigure the Apex class that installs with the package
Check open Opportunities for combined risksApexApply several conditions to each related record
Score a customer Account’s readinessApexCalculate a weighted score with parameters
Account Check Builder Guide: configuration and resultsAll fourStudy the 25 installed Builder Guide Checks value by value
  1. Open the example closest to your requirement and read Before you start.
  2. Create or choose the Check Set it uses, with Active cleared.
  3. Create the Check with the values in its table, replacing names, fields, thresholds, and messages with your organization’s values.
  4. Validate the configuration, then activate the Check and the Check Set.
  5. Add the card to the record page and test the passing and failing cases as a user with normal access.