# RunDocAIWorkflowResult

Output type reporting whether a Document AI Workflow run was accepted, with its run Id or the error.

> Kind: Apex type · Updated: 2026-11-17

RunDocAIWorkflowResult is the custom Apex type returned by Client.runWorkflow() and by the Run Doc AI Workflow Flow action. One result is returned per input, in input order. It reports whether CloudFiles accepted the run, not the workflow's outcome: the workflow runs on CloudFiles afterwards, and its outputs are not part of this result.

## Fields

### Output fields
| Parameter | Type | Required | Description |
|---|---|---|---|
| success | Boolean | optional | true when CloudFiles accepted the run. A run can be accepted and then fail. |
| runId | String | optional | Id of the run in CloudFiles. Empty when the run was not accepted. |
| error | String | optional | Why the run was not accepted. Empty when success is true. |
| runRecordId | String | optional | Id of the CloudFiles Doc AI Run record created for the run. Set only by the Flow action, and empty if that record could not be created. Always empty when the run is started with Client.runWorkflow(). |
