Check that proposal-stage Opportunities meet a minimum Amount
Create a Record Health Check on an Account that reviews every Opportunity in the Proposal/Price Quote stage and passes only when each one has an Amount of at least 25,000. The example uses the Verify with a query Evaluation Type with the Every record passes setting and custom Found and Expected text.
Why a query fits
Section titled “Why a query fits”The Amounts are on related Opportunities, and every one in the stage must meet the minimum. One SOQL query returns them, and Every record passes tests each row. A Check flags undersized proposals for review without blocking anyone from saving an Opportunity.
Before you start
Section titled “Before you start”- Install Record Health Check, and assign yourself Record Health Check Admin and the Salesforce Customize Application permission.
- Confirm the stage name in Setup → Object Manager → Opportunity → Fields & Relationships → Stage. This example uses Proposal/Price Quote, a standard stage value. Use your org’s exact value.
- Replace 25,000 with your approved minimum.
- Confirm that the people who will use the card can read Opportunity Stage and Amount.
Step 1: Create or choose the Check Set
Section titled “Step 1: Create or choose the Check Set”Use the Account Related Record Review Check Set from Check that an Account has at least one Contact, or any active Account Check Set.
Step 2: Create the Check
Section titled “Step 2: Create the Check”Open Setup → Custom Metadata Types, select Manage Records next to Record Health Check, select New, enter these values, and save.
| Field | Value |
|---|---|
| Label | Proposals Meet Minimum Amount |
| Check Set | Account Related Record Review |
| Evaluation Type | Verify with a query |
| Record Health Check Name | Proposals_ |
| Evaluation Order | 40 |
| Active | Cleared until validation succeeds |
| Source Query | SELECT Amount FROM Opportunity WHERE AccountId = {!record. |
| Source Query Field | Amount |
| How To Read Query Results | Every record passes |
| Comparison Operator | At least |
| Expected Value Comes From | Fixed value |
| Expected Value (Fixed) | 25000 |
| If Query Finds No Records | Skip |
| If Field Value Is Empty | Treat as not matching |
| Check Title | Proposal-stage Opportunities meet the minimum Amount |
| Check Description | Passes when every Opportunity in the Proposal/Price Quote stage has an Amount of at least 25,000. |
| Message When Failed | {!record. |
| Fix Message | Review the scope and pricing of each proposal below the minimum. |
| Failure Severity | Warning |
| Action Label | Review Opportunities |
| Action URL | /lightning/r/Account/{!record. |
| Display: Found Text | {!rhcResult. |
| Display: Expected Text | Every proposal is at least 25,000 |
| Applies To | All records |
How the values work:
- At least passes an Amount that is equal to or greater than 25,000.
- If Field Value Is Empty set to Treat as not matching makes an Opportunity with no Amount fail.
- If Query Finds No Records set to Skip shows Skipped when the Account has no proposals.
- Display: Found Text and Display: Expected Text replace the default Found and Expected
lines.
{!rhcResult.failedRecordCount}and{!rhcResult.totalRecordCount}insert the failing and reviewed counts. These two tokens have values only in Display: Found Text and Display: Expected Text on an Every record passes Check, so the counts belong there rather than in Message When Failed, where they would be blank. Change25,000in Display: Expected Text if you change the minimum.
Step 3: Validate and activate
Section titled “Step 3: Validate and activate”- Run the Validate Record Health Check Configuration Flow action, as described in Validate configuration before activation, and correct every error.
- Activate the Check, then the Check Set.
- Add the Record Health Check component to the Account record page, select Account Related Record Review (Account_Related_Record_Review), and activate the page.
- Assign Record Health Check Card User to the users who test the card.
Step 4: Test the Check
Section titled “Step 4: Test the Check”Select Run on the card for each case.
| Proposal-stage Amounts | Result on the card | Found |
|---|---|---|
| None | Skipped | None |
| 25,000 | Pass | 0 of 1 proposals are below the minimum |
| 25,000 and 40,000 | Pass | 0 of 2 proposals are below the minimum |
| 24,999 and 40,000 | Warning | 1 of 2 proposals are below the minimum |
| Blank | Warning | 1 of 1 proposals are below the minimum |
What users see
Section titled “What users see”A failed row shows Warning, the message, the fix message, a Review Opportunities link, and the custom Found and Expected text, such as “1 of 2 proposals are below the minimum” and “Every proposal is at least 25,000”. The Check reviews only the Opportunities the running user can see.
Resolve problems
Section titled “Resolve problems”| What you see | What to check |
|---|---|
| Every Account shows Skipped | The stage value in Source Query matches your org exactly. |
| One undersized proposal still passes | How To Read Query Results is Every record passes. |
| A proposal of exactly 25,000 fails | Comparison Operator is At least, not Greater than. |
| Unable to Check | The user can read Opportunity Stage and Amount. |