# Types.DocumentMapperPayload

Input type describing one Document Mapper run on a document or a set of documents.

> Kind: Apex type · Updated: 2026-10-05

Custom Apex type representing one input entry for Client.documentMapper(). A payload is one run: either one document, or a set of documents mapped together in one combined run.

## Fields

### Fields
| Parameter | Type | Required | Description |
|---|---|---|---|
| configId | String | required | Id of the Document Mapper configuration to run. |
| resource | <a href="#/apex-type-resource">Resource</a> | optional | The document to map. Set this or resources, not both. |
| resources | List&lt;<a href="#/apex-type-resource">Resource</a>&gt; | optional | A set of documents mapped together in one run. Set this or resource, not both. Every entry needs an Id. |
| recordId | String | optional | Id of the Salesforce record the mapped values are written to. |
| context | String | optional | Any text you want back on the Document Mapper Run event. |

## Constructors

```apex
global DocumentMapperPayload(
  String configId,
  Resource resource,
  String recordId
)
```

```apex
global DocumentMapperPayload(
  String configId,
  Resource resource,
  String recordId,
  String context
)
```

```apex
global DocumentMapperPayload(
  String configId,
  List<Resource> resources,
  String recordId,
  String context
)
```
