Skip to content

Choose entry and exit points for an AI-drafted Check

Use this page after the AI has described the business rule and before anyone activates the Check. It covers the supported administrator, Lightning, Flow, and Apex paths. Agentforce and MCP have separate contracts and are outside this decision.

A correct formula, query, or Apex plugin is only the evaluation rule. A complete implementation also identifies who starts it, whose Salesforce access applies, whether the answer is needed now or later, and where the result goes. Record Health Check does not save ordinary run results by itself.

Configuration and verification entry points

Section titled “Configuration and verification entry points”
Entry pointWhat enters Record Health CheckWhat comes back or changesImportant boundary
Salesforce SetupSaved Check Set and Check Custom MetadataInactive or active configurationSave AI drafts inactive; Setup does not prove runtime behavior.
Metadata deploymentVersion-controlled Custom Metadata and any Apex pluginDeployed configuration and codeDeployment success is not business approval or outcome verification.
Validate Record Health Check Configuration Flow actionSaved active and inactive configurationValid flag, counts, and structured JSON findingsThis audits configuration; it does not run the business outcomes.
Record Health Check Preview component or RecordHealthCheckPreviewServiceOne detached Check, an existing parent Check Set, and representative record IDsFindings, capabilities, optional execution results, and optional readiness evidencePreview publishes no result or error-log events and does not save or activate the Check.

Use Validate and preview an AI draft for the exact Preview workflow. A readiness receipt is private, expiring evidence for the exact actor, org, definition, Check Set, mode, and record scope. It is not ordinary result history and is not human approval.

Runtime callerSelection and timingImmediate returnWhere health outcomes go
Lightning record cardOne configured Check Set on one record; page-load or explicit Run/RerunRendered card rows, summary, actions, and permitted diagnosticsThe browser only, unless an explicit Run/Rerun uses enabled user-result publication. Page-load and refresh-driven runs never publish result events.
Flow actionsOne Check or one Check Set per input; synchronous within the Flow transactionSuccess/error channel, status, reason or counts, and evaluation JSONThe Flow should branch on the returned fields. Select event publication only for a separate consumer.
Public Apex APIOne Check or one Check Set for a bounded record list; synchronousTyped RecordHealthCheckResponse, with evaluation, optional display, or summary modeThe caller can act on or save the response. Event publication is optional and independent of the returned response.
RecordHealthCheckQueueableOne Check Set for known record IDs; asynchronousAsyncApexJob ID when acceptedThe packaged job does not return outcomes to its submitter. Publish events, use a custom Queueable that saves the typed response, or accept transient outcomes.
RecordHealthCheckBatchOne Check Set over a bounded known population, split across transactionsAsyncApexJob ID when acceptedThe packaged Batch can publish events. A custom Batch can save returned results during execute; otherwise the outcomes are transient.
RecordHealthCheckScheduledOne Check Set and a fixed record-ID population captured when scheduled; later delegates to BatchCronTrigger schedule IDFollow the later Batch job and its configured event or subscriber-owned persistence path. Newly qualifying records are not discovered automatically.

Use a Check Set rather than a single Check whenever sibling prerequisites or the complete assessment matter. Single-Check Lightning, Flow, and Apex calls do not enforce the selected Check’s sibling prerequisite.

The card, Flow, and Apex paths all apply the effective running user’s sharing and object, field, and record access. Moving work to Queueable, Batch, or Scheduled Apex does not elevate access. Test with the actual interactive user or automation principal, including restriction and scoping rules.

ExitContractOwner and recovery decision
Lightning displayHuman-readable status, messages, values, links, and optional diagnosticsProduct owner approves wording; administrator tests the real page and user.
Flow outputsMachine status/counts plus evaluation JSON; faults use a separate Flow fault pathFlow owner handles every health status and connects the fault path.
Apex responseTyped results, summary, and optional authorized display data; request/authorization failures can throwApex owner handles business results separately from exceptions and avoids logging restricted data.
Async job and schedule IDsSalesforce platform execution state, not health outcome stateAutomation owner monitors Apex Jobs/Scheduled Jobs and separately proves where outcomes went.
Check Result and Check Set Run Platform EventsOptional public lifecycle results published after commitIntegration owner provides idempotency through the event’s application Event ID, retention, retry, access, allocation, and receiver monitoring.
Record Health Check Log Platform EventOptional restricted ERROR diagnosticsSecurity/operations owner limits publisher and subscriber access and protects any stored copy.
Preview readiness receiptPrivate, immutable, expiring verification evidenceRelease owner decides whether evidence is required and cleans up expired receipts.
Subscriber-owned records or external storageOrganization-defined durable historyThe subscriber owns schema, CRUD/FLS, retention, deduplication, partial-save recovery, and reporting.

Platform Event acceptance does not prove receiver delivery. A receiver failure cannot change the already completed health result. With publication NONE and no subscriber-owned saving, asynchronous results are not durable.

Do not approve the draft until its execution and result-delivery plan answers all of these:

  1. Which exact entry point starts the Check, and does it run one Check or the complete Check Set?
  2. Who is the actual running principal, and what data and Apex access will that principal have?
  3. Is the answer required synchronously, or can an asynchronous job produce it later?
  4. What are the typical and maximum record scopes, including related-query volume?
  5. Does the current caller consume a direct response, or is a separate result receiver necessary?
  6. If results must persist, which subscriber-owned object or external system saves them?
  7. If events are enabled, who owns deduplication, retries, retention, allocation, and monitoring?
  8. How are health statuses kept separate from Flow faults, Apex exceptions, failed jobs, publication warnings, and downstream receiver failures?
  9. Which human proves the complete path with PASS, FAIL, SKIPPED, UNABLE_TO_EVALUATE, ERROR, null, permission-restricted, bulk, and recovery cases?

When the selected caller or consumer has not been built, continue with Generate a non-agent execution workflow with AI. That prompt prefers the installed adapters and generates subscriber code only for dynamic selection, direct persistence, or custom recovery.