# SalesforceFilesAttached

Output payload carried by the salesforce-file-attached platform event.

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

Custom Apex type representing the output that Platform Events and the Platform Events Apex Handler return for the salesforce-file-attached platform event type. It is surfaced on the Event payload returned by Client.getEventDetails(). It exposes the following fields.

## Fields

### Output fields
| Parameter | Type | Required | Description |
|---|---|---|---|
| ParentId | String | optional | Id of the record the files were attached to. |
| ParentType | String | optional | Object type (API name) of the parent record. |
| ContentDocumentIds | List&lt;Id&gt; | optional | Ids of the ContentDocument records attached. |
| Files | List&lt;<a href="#/apex-type-salesforce-file">SalesforceFile</a>&gt; | optional | The attached files. SalesforceFile is a custom Apex type; see the supported constructor below. |

## Constructors

```apex
SalesforceFile(
  Id fileId, //contentDocumentId
  String Name,
  String extension,
  Integer fileSize
)
```
