# Entitlements

***

{% hint style="info" %} <mark style="color:blue;">Appflow\.ai only links your entitlements with your SKU, you should know the id of your entitlements yourself</mark>
{% endhint %}

To create entitlement, go to Appflow\.ai Settings => Entitlements => Add new

<figure><img src="/files/6LDZ5IqJvl2rGPCtYISR" alt=""><figcaption></figcaption></figure>

That's it! Your entitlements will be related to your new SKU choice right away!

{% hint style="info" %} <mark style="color:blue;">You can create same entitlements with the same ids but</mark>&#x20;

<mark style="color:blue;">You can't assign same ids to the same apps'SKUs</mark>
{% endhint %}

**Example of how to make entitlements work through Appflow\.ai:**

If you make an entitlement call 'Remove Ads'

<figure><img src="/files/EoTzcX1sLydpTwPDOTs8" alt=""><figcaption></figcaption></figure>

And then you link it to SKU

The value in 'Name / Identifier', will be returned if a user purchases one of the SKU in the 'Linked to SKU' and doesn't expire.

Then you ask your developer/or do yourself: to put to the SDK:

Android:

```kotlin
Appflow.getSubscriberInfo(object : ReceivePurchaserInfoListener {
    override fun onReceived(subscriber: IapIap.Subscriber) {
        var canRemoveAds = false
        for (info in subscriber.entitlementsList) {
            if (info.id == "Remove Ads" && info.isActive) {
                canRemoveAds = true
                break
            }
        }
    }

    override fun onError(error: PurchasesError) {}
})
```

iOS

```swift
Appflow.shared.restorePurchases {[weak self] subscriber, error in  
   var canRemoveAds = false  
   for imEntitlement in subscriber.imEntitlements where (imEntitlement.id == "Remove Ads" && imEntitlement.isActive == true) {  
      canRemoveAds = true  
      break  
   }  
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.appflow.ai/docs/subscription-analytics/entitlements.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
