> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encorekit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PresentationResult

> Outcome of presenting an Encore offer

Represents the result of showing an offer to a user. The result indicates whether the user completed an offer flow, dismissed without completing, or had no offers available.

## Definition

```kotlin theme={null}
sealed class PresentationResult {
    data class Completed(
        val offerId: String,
        val campaignId: String?
    ) : PresentationResult()

    data class Dismissed(
        val reason: DismissReason
    ) : PresentationResult()

    data object NoOffers : PresentationResult()
}

enum class DismissReason(val value: String) {
    USER_CLOSED("user_closed"),
    NO_OFFERS("no_offer_available"),
    ERROR("error"),
}
```

## Cases

| Case        | Associated Values                        | Description                                            |
| ----------- | ---------------------------------------- | ------------------------------------------------------ |
| `Completed` | `offerId: String`, `campaignId: String?` | User completed an offer flow (tapped CTA, opened link) |
| `Dismissed` | `reason: DismissReason`                  | User dismissed the offer sheet without completing      |
| `NoOffers`  | —                                        | No offers were available for this user / placement     |

<Info>
  `NoOffers` is a `data object` — match it directly without destructuring (`is PresentationResult.NoOffers`).
</Info>

## DismissReason

| Value         | Description                                                                                            |
| ------------- | ------------------------------------------------------------------------------------------------------ |
| `USER_CLOSED` | User explicitly dismissed the offer sheet (close button, back gesture)                                 |
| `NO_OFFERS`   | Reserved — typically surfaces as `PresentationResult.NoOffers` instead                                 |
| `ERROR`       | An error occurred during presentation (e.g., no foreground Activity, network failure inside the sheet) |

## Usage

```kotlin theme={null}
lifecycleScope.launch {
    val result = Encore.placement("cancel_flow").show()

    when (result) {
        is PresentationResult.Completed -> {
            Log.d("Encore", "Completed offer: ${result.offerId}")
        }
        is PresentationResult.Dismissed -> {
            Log.d("Encore", "Dismissed: ${result.reason}")
            proceedWithCancellation()
        }
        is PresentationResult.NoOffers -> {
            Log.d("Encore", "No offers available")
            proceedWithCancellation()
        }
    }
}
```

<Info>
  When using the delegate handler pattern (`onPurchaseRequest` / `onPassthrough`), the SDK routes results automatically. `PresentationResult` is primarily used with the suspend `show()` variant for direct control flow.
</Info>
