# Types.UploadSalesforceFilePayload

Input describing a Salesforce file to copy into external storage.

> Kind: Apex type · Updated: 2026-07-01

Represents input for uploading Salesforce files to external storage. Passed to Client.copySalesforceFiles() to copy a Salesforce content document into a destination library and folder.

## Fields

### Fields
| Parameter | Type | Required | Description |
|---|---|---|---|
| contentDocumentId | String | required | Salesforce Id of the content document object to be copied. |
| library | String | required | Type of library. Example &mdash; sharepoint. You can get this value from the Content Library. |
| folderId | String | required | Id of the folder in external storage where the file should be copied to. You can get this value from the Content Library. |
| driveId | String | required | Only applicable for SharePoint or Google Drive libraries. Supply null for other libraries. You can get this value from the Content Library. |
| context | String | optional | Optional. If you want to access the parentId in the Salesforce File Copied event, pass it here in JSON format &mdash; for example: { "recordId": "001dL00000x8X6TQAU" }. If you don't want to pass a value, pass null. |

## Constructors

```apex
UploadSalesforceFilePayload(
  String contentDocumentId,
  String library,
  String folderId,
  String driveId
)
```

```apex
UploadSalesforceFilePayload(
  String contentDocumentId,
  String library,
  String folderId,
  String driveId,
  String context
)
```

## Example

```apex
Types.UploadSalesforceFilePayload payload =
  new Types.UploadSalesforceFilePayload(
    contentDocumentId,
    'sharepoint',
    folderId,
    driveId,
    '{ "recordId": "001dL00000x8X6TQAU" }'
  );
```
