Choose where results go
Every Record Health Check run returns its results to whatever started it, such as the record-page card, a Flow, or Apex code. Record Health Check stores no result history. Decide before you build automation whether results also need to reach another process through Platform Events, or be saved by your own code.
Where each entry point sends results
Section titled “Where each entry point sends results”| Entry point | Immediate result | Optional additional destination |
|---|---|---|
| Lightning record-page card | Rows on the card | Platform Events after a user selects Run or Rerun, when the Check Set and Checks enable them |
| Flow action | Flow output variables, including Status, counts, and Result JSON | Platform Events when the action’s Event Publication input is ACTIONABLE or ALL |
rhc. in Apex | A rhc. object | Platform Events when the request uses withEventPublication with ACTIONABLE or ALL |
| Packaged Queueable, Batch, or Scheduled Apex | Only a job ID. Health results are not returned to the code that submitted the job. | Platform Events when the publication argument is ACTIONABLE or ALL |
| Your own Batch Apex class | A response object in each execute call | Platform Events, or records your class saves |
| Agentforce action | Structured action output for the agent | None. These requests never publish events. |
| Apex REST resource and MCP server | A JSON response | None. These requests never publish events. |
Record Health Check has no packaged object, report, email, or history record for health results. To keep a history, publish Platform Events and save them with a Flow or Apex trigger, or write your own Batch class that saves the fields you need from each response.
Choose an Event Publication value
Section titled “Choose an Event Publication value”Flow, Apex, and the asynchronous helpers use one of three values:
| Value | Check Result events | Check Set Run events |
|---|---|---|
NONE | None | None |
ACTIONABLE | One per result that is FAIL, UNABLE_, or ERROR | One per record, even when every Check passed or was skipped, so a clean record is visible |
ALL | One per result, including PASS and SKIPPED | One per record |
NONE is the default for Apex requests and the asynchronous helpers. A Flow action requires you to
choose a value.
Start with ACTIONABLE for monitoring that only needs to act on problems. Use ALL when a
subscriber must store the complete result for every Check. With ALL, a request for 200 records and
25 Checks publishes up to 5,000 Check Result events, which count toward your org’s Platform Event
allocation.
When the Event Publication value is ACTIONABLE or ALL, the packaged Queueable, Batch, and
Scheduled helpers also publish one final Check Set Run event for the whole job. Its Phase is
COMPLETED or FAILED, and it reports how many records were submitted and processed.
Events from the record-page card
Section titled “Events from the record-page card”The card does not use Event Publication values. Two checkboxes control it instead:
- Publish User Run Event on the Check Set publishes one Check Set Run event when a user selects Run or Rerun.
- Publish User Result Event on a Check publishes that Check’s result, whatever the result is, when a user selects Run or Rerun.
Opening the page, and the automatic refresh after a record save, never publish events. Flow, Apex, and the asynchronous helpers ignore both checkboxes.
Understand when events are delivered
Section titled “Understand when events are delivered”Check Set Run and Check Result events are delivered only after the transaction that published them commits. If a later step rolls the transaction back, those events are never delivered.
Error Log events are different. They are published immediately, even when the transaction later fails, so that an error is not lost. They are controlled by the Check Set’s Publish Error Log Event checkbox and require the Record Health Check Error Log Publisher Permission Set.
Platform Events are messages, not storage. Salesforce retains them for a limited time, and only a subscriber that is listening, such as a platform-event-triggered Flow or an Apex trigger, can act on them or save them.
Confirm what an asynchronous job proves
Section titled “Confirm what an asynchronous job proves”A finished Apex job in Setup → Apex Jobs means Salesforce finished running the job. It does not mean the records passed their Checks. Before you schedule a packaged helper, choose one of these options:
- Use
ACTIONABLEorALL, and build a subscriber that acts on or saves the events. - Write your own Batch class that saves approved fields from each response.
- Use
NONEonly when you deliberately need no record of the results.
A Batch job commits each execute scope separately. If a later scope fails, the events from earlier
scopes have already been delivered and are not withdrawn. Use the job’s final Check Set Run event,
with its FAILED phase and processed count, to tell a partial run from a complete one.
Prevent event loops
Section titled “Prevent event loops”A Flow or Apex trigger that receives a Record Health Check event must not run the same Check Set with event publication again unless it has its own guard against repeats. Otherwise, each result can start another run that publishes another result.