# Product Features

### What Is a Product Feature?

In LicenseSpring, a Product feature is an attribute that is defined for a given product, and can be added to any license issued for that product. In LicenseSpring, we define two product feature types:

#### Activation Feature

![Adding Product Feature](https://content.gitbook.com/content/gLzurdfXUuKr9IziZWLz/blobs/6x2ICj67DodCFinLvQ2T/rhVvZvQRgFlZHQ3G%20ih%20L_image.png)

Activation Features are meant to be used to turn on or off specific functionality within your licensed product, such as a component, module, or set of features.

Once defined for a product, an activation feature can be added or removed from a license, without additional functionality.

#### Consumption Feature

Consumption Features are meant to meter the usage of a component or resource, such as an API, the number of times a Report is generated, or amount of time (in seconds or minutes) that a resource is used.

Consumption features, like Activation features, can be added or removed from a given license. However Consumption features also have the attributes `Max consumption`, `allow overages` (Boolean), a `Max overages` value, and a means to reset the consumption allowances periodically.

![Consumption Period Selection](https://content.gitbook.com/content/gLzurdfXUuKr9IziZWLz/blobs/D0BnB2VXSO51gPJjvz76/0L47MfovPRg_4H5PkkcNg_image.png)

#### Time limited features

Optionally you can define an expiration for the features. You can either set expiration to a specific date (`Expiry date`) or you can set a Valid duration to a feature which is then used to calculate a specific expiry date at the time of the first license activation.

Features that do not have expiry\_date defined are never expired.

License API will also return `is_expired` Bool for every feature. To include expired features in a license check and license activation response, use the `include_expired_features` parameter. See: [Check License](https://docs.licensespring.com/license-api/license-check/check-license).

Feature expiration policy can be defined on a product features, license feature and license policy level.

![Feature Expiration Settings](https://content.gitbook.com/content/gLzurdfXUuKr9IziZWLz/blobs/5sEUgWENqNPAnHEEo3IS/aaiUAGOlpIPJOgsMu%20cUj_image.png)

#### Floating features

Features can also be configured to support concurrent usage, same as on a license level.

More details about this usage can be found in [Floating Features](https://docs.licensespring.com/license-entitlements/floating-features).

{% hint style="info" %}
Depending on your plan you will have access to a certain number of Features and there may be limitations on the type of feature you are allowed to use.
{% endhint %}

Define a New Product Feature

Required Fields

* Feature Name
* Feature Code

Fields for Consumption Features

* Max Consumptions
  * Allow Unlimited Activations
* Allow Overages
  * Max Overages
* Reset Consumption
  * Consumption Period

{% hint style="info" %}
The upper limit for all consumption-related fields (`Max Consumptions`, `Max Overages`) is `Number.MAX_SAFE_INTEGER`. For the exact value, see the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER#value).
{% endhint %}

Once you defined a product, click on the "Features" Tab, and click "Add product feature"

![Adding New Product Feature](https://content.gitbook.com/content/gLzurdfXUuKr9IziZWLz/blobs/o1rV8AdlLztYasuqzHhG/I3fNT2vpIG2r5nqVPOXxA_image.png)

Give the Feature a Name, a Code, and select its type.

![Selecting Product Feature Type](https://content.gitbook.com/content/gLzurdfXUuKr9IziZWLz/blobs/koGGMHPXp2WDSRLutcwn/r_%20sZa_JyefYXQKKE3eIW_image.png)

If the feature is of type consumption, set the default value for Max Consumption, the Value for Max Overages, as well the time interval for which the allowances should reset

![Adjusting Consumption Period](https://content.gitbook.com/content/gLzurdfXUuKr9IziZWLz/blobs/MUIa7A22jR7JwdyETu09/pYe8OwPkIAupoUNRi3VFg_image.png)

{% hint style="info" %}
Adding default allowances for a product feature can always be changed when issuing a new license, or by modifying the entitlements of an existing license. For more information, please visit the "Features" article in the "License Entitlements" section.
{% endhint %}

#### Editing/Deleting Product Features

{% hint style="info" %}
You can rename a product feature, and the default values for consumption features can be modified. However, you cannot change a product feature code.
{% endhint %}

{% hint style="danger" %}
If you delete a product feature, it will be removed from any licenses that are currently using it. Adding the feature back to the product will not add the feature back to the licenses. LicenseSpring does not have any concept of archiving features!
{% endhint %}

To edit a product feature, go to the features list and click on the Pencil icon on the row for that product feature.

To delete a product feature, click on the red garbage can icon on the row for that product feature.

![Features List Actions](https://content.gitbook.com/content/gLzurdfXUuKr9IziZWLz/blobs/KnnQcPHMEPoItruvQihk/oM8duY%20aQhHEiVI6_wmRx_image.png)

#### Feature groups

On a product level, you can group features to groups for easier feature licensing. When issuing licenses you do not need to list all of the features you want for this licenses - you just define a group and attach a group code during order creation.

![Feature Groups Tab](https://content.gitbook.com/content/gLzurdfXUuKr9IziZWLz/blobs/nbXSPLphzmRD92OjTvF5/AAbA3zxpTlgyx8f3nrT63_image.png)

Groups behave similar to license policies in a way that you can also define time limited settings on a group level that would be applied to all license features when license is created.

![Adding Feature Group Form](https://content.gitbook.com/content/gLzurdfXUuKr9IziZWLz/blobs/VCEfMyFX6rpaOQljge6Z/Uriwr2ATbw4kmbLbzbgE__image.png)

Feature groups can be applied to a license policy or used directly when creating order.

![Edit License Policy View](https://content.gitbook.com/content/gLzurdfXUuKr9IziZWLz/blobs/z82SPu8oqGqCAGLIjmSc/HLwBqAPgMdaWtWLyNH_u9_image.png)

{% hint style="info" %}
If you at the same time apply a feature both as a standalone feature and in a group, a standalone feature settings will apply.
{% endhint %}
