# FileViewed

Output payload carried by the file-viewed 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 file-viewed 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 |
|---|---|---|---|
| Resource | <a href="#/apex-type-resource">Resource</a> | optional | The Resource that was viewed. |
| Link | <a href="#/apex-type-link">Link</a> | optional | The Link through which the resource was viewed. |
| RecordId | String | optional | Salesforce Record Id. |
| TimeSpent | Double | optional | Time Spent (In Seconds). |
| Email | String | optional | Viewed By. |
| downloaded | Boolean | optional | Whether the resource was downloaded. |
