---
schema_version: "1"
id: e8e18ca3ffebd84a735c1a6669f6874a78d5b4df6c886ef74d9b19f1cb0b0383
title: AgentforceAttachment
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/genai/agentforce-mobile-sdk/references/android/agentforce-attachment-android.md
canonical_url: https://developer.salesforce.com/docs/ai/agentforce-mobile-sdk/references/agentforce-mobile-sdk/agentforce-attachment-android.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 280160653d590afacd506359d75a571a974a4ab54cd9eb2f9030b02e8d7334bc
products:
  - Agentforce Mobile SDK
  - Agentforce and Einstein Generative AI
---
# AgentforceAttachment

`interface AgentforceAttachment`

Agentforce Attachment data classes

## Signature

```kotlin
interface AgentforceAttachment
```

## Properties

| Property         | Type                                  | Description                                  |
| ---------------- | ------------------------------------- | -------------------------------------------- |
| `attachmentData` | `AgentforceAttachment.AttachmentData` | Attachment data containing source URI and ID |
| `mimeType`       | `String?`                             | MIME type of the attachment                  |

## Methods

| Method           | Signature                                                             | Description                    |
| ---------------- | --------------------------------------------------------------------- | ------------------------------ |
| `attachmentType` | `fun attachmentType(): AgentforceAttachment.AgentforceAttachmentType` | Returns the type of attachment |

## Nested Types

### AttachmentData

```kotlin
data class AttachmentData(
    val sourceUri: Uri? = null,
    val sourceId: String? = null
)
```

### AgentforceAttachmentType

```kotlin
enum class AgentforceAttachmentType : Enum<AgentforceAttachment.AgentforceAttachmentType>
```

**Entries:**

- `Image`
- `PDF`
- `SalesforceFile`

`Image` and `PDF` are the attachment types supported for multimodal input to the AI agent. `SalesforceFile` covers files relayed through Salesforce outside of that input path, such as files a human agent shares during a conversation handoff.

## Implementations

| Class            | Description                               |
| ---------------- | ----------------------------------------- |
| `Image`          | Image attachment implementation           |
| `PDF`            | PDF attachment implementation             |
| `SalesforceFile` | Salesforce file attachment implementation |

## Related Documentation

- [AgentforceMessage](https://developer.salesforce.com/docs/ai/agentforce-mobile-sdk/references/android/agentforce-message-android.md)
- [AgentforceConversation](https://developer.salesforce.com/docs/ai/agentforce-mobile-sdk/references/agentforce-mobile-sdk/agentforce-conversation-android.md)
