Examples you can copy
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.
Choose the right Evaluation Type
Section titled “Choose the right Evaluation Type”Start with where Salesforce stores the information the requirement needs.
| The answer depends on | Evaluation Type | Examples |
|---|---|---|
| Fields on the record, or on a parent record such as the Parent Account | Verify with a formula | Formula examples |
| Related records, such as Contacts, Opportunities, or Cases | Verify with a query | Query examples |
| Two counts or two lists from related records that must agree | Compare two queries | Compare two queries examples |
| Logic that a formula or query cannot express | Verify with Apex | Apex 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.
All examples
Section titled “All examples”| Example | Evaluation Type | What it teaches |
|---|---|---|
| Check that an Account has a Phone or Website | Formula | Accept either of two fields with OR() |
| Check that the billing address is complete | Formula | Require several fields with AND(), and name the missing ones in Found |
| Check partner Accounts for a billing country | Formula | Skip records with an applicability formula |
| Check the parent Account’s headquarters city | Formula | Read a parent record, and link to it |
| Check that an Account meets a minimum employee count | Formula | Compare a number, and show Found and Expected on every row |
| Check that an Account has at least one Contact | Query | Compare a COUNT() with a fixed number |
| Check that every open Opportunity has a Next Step | Query | Require every returned record to pass |
| Check that an Account has a significant open Opportunity | Query | Pass when any record exceeds a value calculated from the Account |
| Check that proposal-stage Opportunities meet a minimum Amount | Query | Write custom Found and Expected text |
| Check Contact emails for a placeholder domain | Query | Ignore blank values, and depend on a prerequisite Check |
| Check that the Account Owner is on the Account Team | Query | Find one value in a list returned by a query |
| Check that the high-priority Case backlog is within a limit | Query | Compare with a maximum, and publish an optional Platform Event |
| Check that every open Opportunity has a Contact Role | Compare two queries | Compare two counts, and handle aggregates that return no rows |
| Check that open pipeline includes a previously purchased Product | Compare two queries | Test whether two lists share a value |
| Check that the Account Team includes every open Opportunity owner | Compare two queries | Test whether one list contains every value of another |
| Check that an Account has recent activity | Apex | Configure the Apex class that installs with the package |
| Check open Opportunities for combined risks | Apex | Apply several conditions to each related record |
| Score a customer Account’s readiness | Apex | Calculate a weighted score with parameters |
| Account Check Builder Guide: configuration and results | All four | Study the 25 installed Builder Guide Checks value by value |
Copy an example
Section titled “Copy an example”- Open the example closest to your requirement and read Before you start.
- Create or choose the Check Set it uses, with Active cleared.
- Create the Check with the values in its table, replacing names, fields, thresholds, and messages with your organization’s values.
- Validate the configuration, then activate the Check and the Check Set.
- Add the card to the record page and test the passing and failing cases as a user with normal access.