Skip to content

Operate in production

Guide5 min read

Keep Record Health Check reliable after it is live: control Platform Event volume, keep diagnostics off, back up configuration, watch the automation that receives events, and retest after changes. Start here after a Check Set works in production; for the first setup, see Install Record Health Check in a sandbox.

Keep Platform Events off until automation needs them

Section titled “Keep Platform Events off until automation needs them”

Every publication setting is off by default. Leave them off when people use results only on the card, or when the Flow or Apex code that runs the Checks uses the returned result. Each published event counts toward your org’s Platform Event allocations, which every publisher in the org shares.

PracticeWhy
Turn on publication for one Check Set or Check at a time.A change in event volume can be traced to one setting.
Prefer Set Run events over Result events.One Set Run event per record replaces one Result event per Check per record.
Turn on Publish Error Log Event only when restricted monitoring is ready.Each Unable to Check and System Error result can publish a Log event with restricted details.
Review which Check Sets and Checks publish, at least every quarter.A copied or retired Check can keep publishing events that nothing uses.
Review Platform Event usage regularly.When an allocation runs out, events stop arriving although the Checks still run.

To find every publication and diagnostics setting in the org, run these queries in the Developer Console’s Query Editor or with sf data query. In your org, the package’s fields need the rhc__ prefix:

SELECT QualifiedApiName, rhc__PublishUserRunEvent__c, rhc__PublishErrorLogEvent__c,
rhc__ShowDiagnostics__c
FROM rhc__Record_Health_Check_Set__mdt
SELECT QualifiedApiName, rhc__Record_Health_Check_Set__r.QualifiedApiName
FROM rhc__Record_Health_Check__mdt
WHERE rhc__PublishUserResultEvent__c = true

Flow and Apex callers choose publication with their Event Publication value, which is not stored on the Check Set. Review the Flows and Apex code that use ACTIONABLE or ALL. See Decide when to use Platform Events.

Show Diagnostics applies to every authorized user of the Check Set, for as long as it is selected. It has no expiration.

  1. Select it only on the Check Set you are investigating.
  2. Only users directly assigned Record Health Check Diagnostics Viewer or Record Health Check Admin see the extra detail. Assign Diagnostics Viewer only for the investigation.
  3. Clear Show Diagnostics and remove the temporary assignments when you finish.
  4. Use the first query above to find Check Sets where Show Diagnostics is still selected.

See Troubleshoot with Show Diagnostics.

WhenWhat to do
Before every deployment and every package upgradeBack up every Check Set and Check your organization created.
After a session of direct edits in SetupBack up again, so the copy includes the edits.
On a regular schedule, such as weeklyBack up and compare with the previous copy to find changes made outside your release process.
Before uninstallingBack up. Uninstalling deletes every Check Set and Check.

Restore the backup to a sandbox from time to time to prove that it works. See Back up and restore configuration.

Monitor the automation that receives events

Section titled “Monitor the automation that receives events”

A Platform Event can fail to publish, or publish and then fail in the Flow, Apex trigger, or integration that receives it. Neither failure changes the result already returned, so monitor both.

What to monitorWhy
SET_RUN_PUBLISH_FAILED, CHECK_RESULT_PUBLISH_FAILED, and LOG_EVENT_PUBLISH_FAILED warnings in debug logsRecord Health Check logs a rejected publish and does not retry it.
Failed Flow interviews and Apex trigger errorsAn event can arrive and then fail in the receiving automation.
Duplicate records created from one eventThe receiving automation must skip an Event ID it already saved.
Who can read the Log eventIt contains error messages and stack traces. Only support staff should receive it.
Event volume per Check SetA rise can mean a new caller, a changed schedule, or automation that runs the Checks more often than intended.

To capture a debug log, see Salesforce debug logs. For missing or repeated events, see Troubleshoot a missing or repeated event.

Review permission set assignments at least every quarter:

  • Record Health Check Admin: only the people who maintain Check configuration.
  • Record Health Check Diagnostics Viewer: only during an investigation.
  • Record Health Check Error Log Publisher: only users who run Check Sets with Publish Error Log Event selected, and who may read error details.
  • Record Health Check MCP Integration: only the integration user of the MCP service.
  • Record Health Check Card User and Record Health Check User: the people and automation users who run Checks.

See Permission sets.

Run this checklist after every deployment, package upgrade, or Salesforce release, and on a regular schedule between them:

  • Each record page with the card shows the intended Check Set.
  • A record known to pass shows the expected passing results.
  • A record known to fail shows the expected severity, Found and Expected values, and fix link.
  • A user with normal access sees the same results as in testing.
  • No Check Set has Show Diagnostics selected outside an investigation.
  • Publication settings match the intended production configuration.
  • Each Flow, Apex caller, and receiving automation still handles every status: PASS, FAIL, SKIPPED, UNABLE_TO_EVALUATE, and ERROR.
  • Validate configuration reports no errors.
  • The configuration matches the latest backup, with no unexpected deletions or inactive records.

When an item fails, start here:

Failed itemWhere to fix it
The card is missing or shows the wrong Check SetConfigure the record-page component
A known record shows an unexpected resultValidate configuration, then compare the Check with the latest backup
A user sees a different result than in testingTroubleshoot execution context
Diagnostics or publication settings are not as intendedRun the queries in Keep Platform Events off until automation needs them and correct the records
Configuration differs from the backupBack up and restore configuration