Run Scorers with Invocable Actions
Once you define a custom scorer and deploy it, you can run it against real agent traffic with a pair of invocable actions:
triggerAgentBulkScoringruns a batch of sessions or intents through one or more LLM-driven scorers.ingestManualAgentScoreswrites reviewer-provided scores against sessions, intents, or interactions when a human is the evaluator.
triggerAgentBulkScoring is a standard invocable action available through REST, Salesforce Flow, and Apex. ingestManualAgentScores is available through REST only. Use these actions to backfill scores over historical traffic, wire scoring into a review workflow, or feed a downstream reporting pipeline.
| Use case | Action |
|---|---|
| Score a batch of past sessions or intents with an LLM-driven scorer. | triggerAgentBulkScoring |
| Record a score that a human reviewer assigned to a session or intent. | ingestManualAgentScores |
- At least one
AiAgentScorerDefinitiondeployed to your org, with a version whosestatusisAvailableand whoseagentAssociation.isActiveistrue. See Scorer Status. A scorer is only eligible to run when both conditions hold — aDraftversion, or anAvailableversion with an inactive agent association, won’t produce scores. - The agent that the scorer is associated with exists in the org.
- To call
ingestManualAgentScores, the referenced scorer must have engine typeManual.ingestManualAgentScoresrejects scores targeting a scorer with any other engine type.
Kicks off an asynchronous pipeline that runs one or more scorers against a batch of session or intent IDs. All IDs and all scorers in a single call must belong to the same agent.
| Field | Type | Description |
|---|---|---|
inputIds | List<String> | Required. The session or intent IDs to score. Up to 500 per call. All IDs must belong to the same agent. |
inputScope | picklist | Required. The kind of ID in inputIds. Valid values: Session, Intent. |
scorerApiNames | List<String> | Required. The API names of the scorers to run. Up to 10 per call. Each scorer must have a version with status: Available and agentAssociation.isActive: true, associated with the same agent as the input IDs. |
daysBack | integer | Optional. The number of days to look back when finding entities to score. Must be between 1 and 180. Default is 90. |
- The call returns immediately; scoring runs asynchronously in the background. There is no status-polling endpoint yet — read the resulting scores from the target reporting objects once the pipeline completes.
- If any input ID or scorer API name references a different agent, the entire request fails.
- If a referenced scorer has no version that is both
Availableand has an active agent association, the entire request fails.
You can also invoke this action from a Flow with the Action element by selecting triggerAgentBulkScoring.
Writes reviewer-provided scores against sessions, intents, or interactions. Every score in the request must reference a scorer whose engine type is Manual — that is, a scorer designed to receive scores from a human reviewer rather than from an LLM.
| Field | Type | Description |
|---|---|---|
manualScores | string | Required. A JSON-encoded array of manual score objects. See Manual Score Schema. |
sourceType | string | Optional. A free-form string tag that identifies the source of the scores. Default is API. Set it to any value that helps you segment your data — for example, the name of a review UI, a batch job identifier, or the model name of an AI reviewer. |
attribute | string | Optional. Up to 1 KB of user-defined key-value JSON. Use this for audit metadata like a review run ID or reviewer group. The value is stored verbatim alongside each score in the same call. |
daysBack | integer | Optional. The number of days to look back when finding entities to score. Must be between 1 and 180. Default is 90. |
Each object in the manualScores array has these fields.
| Field | Type | Description |
|---|---|---|
scorerApiName | string | Required. The API name of the scorer that this score belongs to. The scorer’s engine type must be Manual; the request fails otherwise. |
sessionId | string | Provide exactly one of sessionId, intentId, or interactionId. The ID must match the input scope of the scorer. |
intentId | string | See sessionId. |
interactionId | string | See sessionId. |
label | string | Required. A short display label for the score, such as Pass or Positive Sentiment. |
value | string | Required. The score value. Up to 4 KB. Format depends on the scorer’s dataType — for a Number scorer, a numeric string; for a Text scorer, the raw text. |
isPassed | boolean | Required. Whether this score maps to a Pass outcome. |
associationReason | string | Optional. Free-form reviewer notes explaining the score. Useful for audit and for training data. |