Skip to content
Suggest a correction

Check that proposal-stage Opportunities meet a minimum Amount

Example4 min read

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.

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.

  • 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.

Use the Account Related Record Review Check Set from Check that an Account has at least one Contact, or any active Account Check Set.

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

FieldValue
LabelProposals Meet Minimum Amount
Check SetAccount Related Record Review
Evaluation TypeVerify with a query
Record Health Check NameProposals_Meet_Minimum_Amount
Evaluation Order40
ActiveCleared until validation succeeds
Source QuerySELECT Amount FROM Opportunity WHERE AccountId = {!record.Id} AND StageName = 'Proposal/Price Quote'
Source Query FieldAmount
How To Read Query ResultsEvery record passes
Comparison OperatorAt least
Expected Value Comes FromFixed value
Expected Value (Fixed)25000
If Query Finds No RecordsSkip
If Field Value Is EmptyTreat as not matching
Check TitleProposal-stage Opportunities meet the minimum Amount
Check DescriptionPasses when every Opportunity in the Proposal/Price Quote stage has an Amount of at least 25,000.
Message When Failed{!record.Name fallback="This Account"} has proposal-stage Opportunities below the minimum Amount or with no Amount.
Fix MessageReview the scope and pricing of each proposal below the minimum. Do not raise an Amount only to pass this Check.
Failure SeverityWarning
Action LabelReview Opportunities
Action URL/lightning/r/Account/{!record.Id}/related/Opportunities/view
Display: Found Text{!rhcResult.failedRecordCount} of {!rhcResult.totalRecordCount} proposals are below the minimum
Display: Expected TextEvery proposal is at least 25,000
Applies ToAll 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. Change 25,000 in Display: Expected Text if you change the minimum.
  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 Related Record Review (Account_Related_Record_Review), and activate the page.
  4. Assign Record Health Check Card User to the users who test the card.

Select Run on the card for each case.

Proposal-stage AmountsResult on the cardFound
NoneSkippedNone
25,000Pass0 of 1 proposals are below the minimum
25,000 and 40,000Pass0 of 2 proposals are below the minimum
24,999 and 40,000Warning1 of 2 proposals are below the minimum
BlankWarning1 of 1 proposals are below the minimum

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.

What you seeWhat to check
Every Account shows SkippedThe stage value in Source Query matches your org exactly.
One undersized proposal still passesHow To Read Query Results is Every record passes.
A proposal of exactly 25,000 failsComparison Operator is At least, not Greater than.
Unable to CheckThe user can read Opportunity Stage and Amount.