show(). The result indicates the outcome of the offer presentation.
Structure
interface PlacementResult {
status: 'granted' | 'not_granted' | 'completed' | 'dismissed' | 'no_offers';
reason?: string;
entitlement?: string;
offerId?: string;
campaignId?: string;
}
Fields
| Field | Type | Description |
|---|---|---|
status | string | The outcome of the offer presentation |
reason | string? | Reason for not_granted or dismissed status |
entitlement | string? | The entitlement granted (when status is 'granted') |
offerId | string? | The offer ID (Android, when status is 'completed') |
campaignId | string? | The campaign ID (Android, when status is 'completed') |
Status values
| Status | Description | Platform |
|---|---|---|
granted | User accepted an offer and received an entitlement | iOS |
not_granted | Entitlement not granted (user declined or system reason) | iOS |
completed | Offer flow completed successfully | Android |
dismissed | User dismissed the offer | Android |
no_offers | No offers available for this placement | Android |
Usage
const result = await Encore.show('cancellation_flow');
switch (result.status) {
case 'granted':
case 'completed':
console.log('User accepted the offer');
break;
case 'not_granted':
case 'dismissed':
case 'no_offers':
console.log('Proceeding with original flow');
break;
}