> For the complete documentation index, see [llms.txt](https://doc.appflow.ai/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.appflow.ai/docs/subscription-analytics/entitlements.md).

# Entitlements

Entitle your users with remote configuration control

***

{% 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="https://1902080327-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTUSTYqtR8RNNkx3qqWf9%2Fuploads%2FPsltlFDpX0rsnrP3ZLeD%2Fimage.png?alt=media&amp;token=c2df0675-d78f-4815-a8df-0dc37b412827" 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="https://1902080327-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTUSTYqtR8RNNkx3qqWf9%2Fuploads%2FCkG5Rmmx5SNbEPFqOch3%2Fimage.png?alt=media&amp;token=6989ac02-0093-4bc8-99ce-d96955e3f489" 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
