Subscriptions are created in Chargebee using items. Items represent the products or services that you offer to your customers. Items often differ in the number of product features that are available to them. The Features API helps you define the various features offered as part of your product line. It also defines the entitlements that items and subscriptions can have towards said features.
Note
The maximum number of features a site can have is 400.
Features of this API
The Features API enables you to:
- Define the set of features provided by your product.
- Specify the entitlements that items have towards said features.
- For a given subscription, modify the entitlements inherited from items in the subscription.
- Offer additional feature entitlements to subscriptions than those inherited from items in the subscription.
- Serve as a source of truth to your provisioning systems for subscription entitlements.
- Use entitlement information to understand which features drive value and revenue.
Sample FeatureJSON
Features attributes
A unique and immutable identifier for the feature. You can set it yourself, in which case it is recommended that a human-readable format (or slug) be used. For example, number-of-users-ccjht01.
When not provided, a random value is automatically set.
A case-sensitive unique name for the feature. For example: user license
, data storage
, Salesforce Integration
, devices
, UHD Streaming
, and so on.
Note: This name is not displayed on any customer-facing documents or pages such as invoice PDFs or hosted pages. However, in the future, it is likely to be introduced on the Self-Serve Portal .
The current status of the feature.
A draft
or an archived
feature can be changed to active.
Any entitlements
or subscription entitlements
defined for the feature take effect immediately.
An active
feature can be changed to archived.
Once archived
, no new
entitlements
or subscription entitlements
can be created for the feature. However, any pre-existing item or subscription entitlements from the time that the feature was active
, remain effective.
The feature is in an unpublished state. Entitlements
and subscription entitlements
can be created for a draft feature but they are not effective until the feature is active. A feature status
cannot be changed back to draft
once it is in active
or archived
status
.
The type of feature.
A switch or toggle is a feature that an item or subscription can be either fully entitled to or not entitled to at all.
The entitlement levels available for this feature are defined as a set of custom values. For example, a feature Email Support
can have entitlement levels as 24×7
and 24×5
.
The feature is quantity-based and entitlement levels available for it are a set of predefined number of quantity units. For example, a feature with name
such as number of users
can have entitlement levels of say, 5
, 20
, 50
, and 100.
levels[is_unlimited]
is used for specifying the "unlimited" entitlement level.
The feature is quantity-based and the entitlement levels available for it are the set of whole numbers within a range. The range is defined by a minimum and a maximum value. For example, a feature such as number of users
can have entitlement levels starting at 5
users and go up to 50000.
levels[is_unlimited]
is used for specifying the "unlimited" entitlement level.
For features of type
quantity
or range
, this specifies the unit of measure. The value is expected in the singular form and when used by the system, it is pluralized automatically as needed. For example, for a feature such as user licenses
, the unit
can be license
.
The version number of this resource. For every change made to the resource, resource_version
is updated with a new timestamp in milliseconds.
The version number of this resource. For every change made to the resource, resource_version
is updated with a new timestamp in milliseconds.
An ordered list of entitlement levels available for the feature. This is only applicable when type
is other than switch
.
Note:
When the type
of the feature is switch
, this is not applicable. This is because any given entity can be either fully entitled to a switch
feature or not entitled at all; there are no intermediate entitlement levels.