# DocumentSlotBinding

Binds one document to a named document slot of a Document AI Workflow.

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

DocumentSlotBinding pairs one document with the workflow slot it fills. It is used in Types.RunWorkflowPayload for Client.runWorkflow(), and as the Documents input of the Run Doc AI Workflow Flow action, where it appears as the Apex-defined type cldfs__DocumentSlotBinding.

## Fields

### Fields
| Parameter | Type | Required | Description |
|---|---|---|---|
| slot | String | required | The slot name exactly as the workflow declares it, for example invoice. Slot names are case sensitive. Repeat the same slot name across entries to bind several documents to one slot. |
| resource | <a href="#/apex-type-resource">Resource</a> | required | The document. For a Salesforce File, set library to salesforce and id to the ContentDocumentId. For a file in external storage, set library to the storage type, id to the file's Resource Id, and driveId for SharePoint and Google Drive. |

## Constructors

```apex
global DocumentSlotBinding(
  String slot,
  Resource resource
)
```

```apex
global DocumentSlotBinding()
```
