Skip to content

Feature levers

Feature levers allow or limit access to certain features of your product according to a customer's subscription plan. In Planship, this is accomplished by the combination of levers that define features and default values and entitlements that specify specific limits or allowances for these levers on individal plans.

Example

Imagine a product that does parallel processing of customer data, where different pricing tiers offer different levels of processing concurrency. To accomplish this with Planship, you would define an execution-concurrency lever and then create entitlements that specify desired execution-concurrency values on different plans (E.g. 1, 10, and 100 on "Free," "Personal," and "Business" plans respectively).

Creating a lever

Creating a feature lever is straightfoward - choose a unique name, select its type, and specify a default value along with any additional configuration specific to the feature type.

Name and slug

When lever-related data (E.g. entitlements or usage) is retrieved via the Planship API, the lever is identified by its slug. Lever slugs are unique within a product, and just like all other slugs in Planship, they are autogenerated from their names.

Default value

The default value of a lever is the value used for implicit entitlements across all plans.

Types

Planship comes with a number of built-in feature types to support feature levers commonly used in SaaS pricing.

Feature flag

Feature flags are simple on/off boolean features where a given feature is either available on a given plan or not.

Tip

A feature flag lever can be implicily turned on or off across all plans by setting the lever's default value to true or false.

Integer

Integer levers represent numerical features and are useful for defining limits on unmetered product resources (For handling metered product resources, see metered levers). In addition to the default value, the following configuration options are available:

  • min - minimum allowed entitlement value (default: 0)
  • max - maxium allowed entitlement value (default: 100)
  • step - entitlement value step increment (default: 0)
  • infinite - value that represents an inifinite entitlement value (default: -1)

List

List levers provide a list of values and are useful for features that map to one or more sub-features (E.g. A list of 3rd-party integrations a plan is entitled to).