---
title: Attributes
slug: experience/attributes
description: Learn about the updated attributes in a purple application, including their triggers, specifications, and examples. This document covers changes in account state, purchase state, subscription codes, and entitlement state. Discover how these attributes are
docTags: 
createdAt: 2023-03-24T10:48:16.000Z
---

## Getting started

In the graphic below you can see the part that is covered in this chapter:

![](https://api.archbee.com/api/optimize/ygR6KtT9QI_R0u3uKTJsm/iQzWp4DZtbKK_VF45Nm6z_attributes.jpg)

A purple application technically consists of a native part and an experience part that runs within a web view.&#x20;

The attributes in this documentation are listed under the [Native app](docId\:dFUCRmFGqFURGuiv8nlTC) or [Experience](docId\:dFUCRmFGqFURGuiv8nlTC) subchapters based on the origin they occur.

### Update all attributes

The values of some attributes depend, for example, on purchase options or user actions and must be updated when changes occur. These conditions are as follows:

- Account state did change (e.g. account has been logged out)
- Any purchase state did change (e.g. after restoring purchases)
- Subscription codes did change (e.g. user added a new one)
- Entitlement state did change (e.g. user did log in or did log out)

In addition to the state changes mentioned above *all known attributes are always updated&#x20;*&#x77;hen the app **started** or **resumed from background**.&#x20;

## Native app

### HAS\_ACTIVE\_SUBSCRIPTION

:::hint{type="info"}
This attribute indicates if the user has any active app store subscription.
:::

:::::Tabs
:::Tab{title="Trigger"}
*Android / iOS*:&#x20;

This attribute is always updated&#x20;

- when [all are updated](docId\:dFUCRmFGqFURGuiv8nlTC) or
- when a subscription is **purchased**.
:::

:::Tab{title="Specification"}
| **Key**                   | **Type** |
| ------------------------- | -------- |
| HAS\_ACTIVE\_SUBSCRIPTION | Boolean  |


:::

::::Tab{title="Examples"}
:::CodeblockTabs
Default

```json
"HAS_ACTIVE_SUBSCRIPTION": {
    "templates": {
        "name": "has_active_subscription"
    }
}
```

Firebase

```json
"HAS_ACTIVE_SUBSCRIPTION": {
    "templates": {
        "name": "has_active_subscription"
    }
}
```
:::
::::
:::::

***

### HAS\_ACTIVE\_SUBSCRIPTION\_CODE

:::hint{type="info"}
This attribute indicates if the user has any active subscription code.&#x20;
:::

:::::Tabs
:::Tab{title="Trigger"}
*Android / iOS*:&#x20;

This attribute is always updated&#x20;

- when [all are updated](docId\:dFUCRmFGqFURGuiv8nlTC) or
- whenever a subscription code is **added** or **removed**.&#x20;
:::

:::Tab{title="Specification"}
| **Key**                         | **Type** |
| ------------------------------- | -------- |
| HAS\_ACTIVE\_SUBSCRIPTION\_CODE | Boolean  |


:::

::::Tab{title="Examples"}
:::CodeblockTabs
Default

```json
"HAS_ACTIVE_SUBSCRIPTION_CODE": {
    "templates": {
        "name": "has_active_sub_code"
    }
}
```

Firebase

```json
"HAS_ACTIVE_SUBSCRIPTION_CODE": {
    "templates": {
        "name": "has_active_sub_code"
    }
}
```
:::
::::
:::::

***

### HAS\_BOOKMARKS

:::hint{type="info"}
This attribute indicates if the user has any bookmark on his device.
:::

:::::Tabs
:::Tab{title="Trigger"}
*Android / iOS*:&#x20;
This attribute is always updated&#x20;

- when [all are updated](docId\:dFUCRmFGqFURGuiv8nlTC) or
- whenever a bookmark is **added** or **removed**.&#x20;
:::

:::Tab{title="Specification"}
| **Key**        | **Type** |
| -------------- | -------- |
| HAS\_BOOKMARKS | Boolean  |


:::

::::Tab{title="Examples"}
:::CodeblockTabs
Default

```json
"HAS_BOOKMARKS": {
    "templates": {
        "name": "has_bookmarks"
    }
}
```

Firebase

```json
"HAS_BOOKMARKS": {
    "templates": {
        "name": "has_bookmarks"
    }
}
```
:::
::::
:::::

***

### HAS\_ENTITLEMENT\_LOGIN

:::hint{type="info"}
This attribute indicates if the user is currently logged in or logged out.&#x20;
:::

:::::Tabs
:::Tab{title="Trigger"}
*Android / iOS*:&#x20;
This attribute is always updated&#x20;

- when [all are updated](docId\:dFUCRmFGqFURGuiv8nlTC) or
- when a user **logs in** or **logs out**.&#x20;
:::

:::Tab{title="Specification"}
| **Key**                 | **Type** |
| ----------------------- | -------- |
| HAS\_ENTITLEMENT\_LOGIN | Boolean  |


:::

::::Tab{title="Examples"}
:::CodeblockTabs
Default

```json
"HAS_ENTITLEMENT_LOGIN": {
    "templates": {
        "name": "has_entitlement_login"
    }
}
```

Firebase

```json
"HAS_ENTITLEMENT_LOGIN": {
    "templates": {
        "name": "has_entitlement_login"
    }
}
```
:::
::::
:::::

***

### HAS\_PURCHASED\_ISSUE

:::hint{type="info"}
This attribute indicates whether the user purchased an issue purchased through a single purchase product.
:::

:::::Tabs
:::Tab{title="Trigger"}
*Android / iOS*:&#x20;
This attribute is always updated&#x20;

- when [all are updated](docId\:dFUCRmFGqFURGuiv8nlTC) or
- when an issue is **purchased**.
:::

:::Tab{title="Specification"}
| **Key**               | **Type** |
| --------------------- | -------- |
| HAS\_PURCHASED\_ISSUE | Boolean  |


:::

::::Tab{title="Examples"}
:::CodeblockTabs
Default

```json
"HAS_PURCHASED_ISSUE": {
    "templates": {
        "name": "has_purchased_issue"
    }
}
```

Firebase

```json
"HAS_PURCHASED_ISSUE": {
    "templates": {
        "name": "has_purchased_issue"
    }
}
```
:::
::::
:::::

***

## Experience

Currently no specific experience attributes are existing.&#x20;
