Article Image

A Primer on SaaS Feature Management

17th May 2022

What is Feature Management?

Feature management is an umbrella term for the tools and techniques adopted by software engineering teams to build, experiment and release features in a controlled manner.

At the core of feature management, is the concept of a feature flag.

A feature flag in is simplest form, is an if-else statement, gating the execution of a freshly written block of code. The feature flag is typically toggled on or off via a UI.

The canonical use-case of a feature flag is to decouple code deployments from feature releases. They become a powerful tool for controlled releases when practiced with A/B testing and experimentation, during which the flag’s underlying logic causes a specified proportion of executions to take the if-clause, while the rest goes down the else-clause.

This allows a product manager (PM) to incrementally roll out a feature, while monitoring key metrics for statistical significance. He or she then makes a data driven call on whether a feature will fulfil its raison d'être and justifies a full release.

Feature Flags vs Entitlements

An entitlement refers to the right to use a feature. In the context of a plan-based SaaS application, it is essentially whether Bob on Plan A can use Feature X. Entitlements are used to define the features each plan can access.

One way to implement customer entitlements is through the use of role-based access control (RBAC). Through RBAC, a user is assigned a role and assuming the role grants him or her a specific set of permissions. In the SaaS context, a user is assigned to a plan (role). The plan entitles him or her to a specific set of features (permissions).

While feature flags and entitlements are orthogonal concepts, feature flags can be used to streamline the implementation of entitlements, resulting in cleaner code.

Managing entitlements through feature flags allows your business to unlock additional value for customers as well as minimize risk.

Using Feature Flags for Entitlements

How do we structure a feature flag for entitlements?

While most feature flags are boolean flags (a feature is either on or off) some tools allow you to have more than two variations, with types such as strings, numbers or JSON.

For example, LaunchDarkly allows you to add JSON variations to your feature flag. You can then encode additional metadata within the JSON variations which you can then parse and use in your control flow logic.

Can we get there with LaunchDarkly’s flag variations? Here is some pseudo-code using LaunchDarkly’s SDK:

client.on('ready', () => {
const flagValue = client.variation('YOUR_FEATURE_KEY', {});
const flagMeta = JSON.parse(flagValue);
// Retrieve the list of plans for the feature
const { planIds } = flagMeta;
// TODO: Retrieve current user plan
// TODO: Check if current user plan is in the list of plans

Encoding a list of plans that entitles customers to this feature is a naive but unscalable approach.

In terms of feature flag implementation, we will need to retrieve a customer’s plan and compare that to the list of plans in the feature’s metadata. This isn’t too difficult but involves round trips to the feature flag service as well as your own backend to retrieve the relevant data.

More often than not, your pricing plans will be in a constant state of change. When you release new features, you need to decide which plans can access it. You may suddenly decide to let all users have access to a feature to keep up with the competition. You may want to carve out a limited time deal with a standalone set of features. Or grant a specific customer more usage of a feature as gesture of goodwill.

Coming from the angle of the product manager or sales team responsible for adjusting packaging, having to navigate a developer-first UI centered around features and updating planIds one by one is cumbersome, and simply a poor use of time.

Moreover, entitlements are merely the tip of the iceberg.

SaaS Feature Management, Build or Buy?

A more complete solution for SaaS applications should include:

  • • First-class support for Plans. A single source of truth so that Sales, Marketing, Customer Service and Product Management all know about the features included in each plan and are making decisions off the same data.
  • • The ability to define a usage limit on a feature and evaluate if a customer’s current usage is within limits
  • • The ability to set daily, weekly or monthly quotas on usage
  • • The ability to track usage of a feature on a customer-level (LaunchDarkly only tracks flag evaluations)
  • • The ability to continuously measure the results of price and packaging changes and flexibly change them
  • • The ability for PMs or Sales to easily generate customized packages for a client eg. for Enterprise sales

As all this logic is probably going to be the same for every SaaS you build, there's immense value in abstracting it into a general-purpose framework.

You could build the solution yourself, and many makers have indeed done so. But if you would rather focus on your core product, here's where Limiter comes in.

Limiter is a one-stop solution centered around feature management for SaaS applications. It supports plan management, entitlement systems, limits & quotas, as well as the monitoring tools to measure the effectiveness of any pricing and packaging changes — all the plumbing that you need to support your SaaS subscription pricing models.

Sign up for free. No credit card required.