Application features & contract (TenancyEngine)
Define what your product can do per environment. Features, offerings, roles, and claims form the product contract tenants inherit when they subscribe.
Console: Application workspace → Features (also Offerings, Roles, Claims)
Use the contract environment selector (Development / Staging / Production) to edit the copy for each stage.
Environments
| Environment | Purpose |
|---|---|
| Development | Experiment freely; bootstrap from Production when needed |
| Staging | Pre-production validation; promote to Production when ready |
| Production | Live tenant entitlements |
Promote contract copies Staging → Production (or Development → Staging) after review. The diff panel highlights additions and changes before you confirm.
Features
Each feature has a stable key, display metadata, and optional limits. On Production, set a rollout channel (Stable / Beta / Preview) to control which tenants receive the capability based on their release channel.
Default rollout for new production features is configured on Settings → Production contract.
Limit a feature to certain plans or a share of customers
On the Production contract, open a feature with Edit to choose who gets it:
- Plans. Tick the plans that should have the feature. With no plan ticked, every plan is included. A customer with no active plan, or whose plan is suspended, does not get a plan-limited feature.
- Share of customers. Drag the slider to give the feature to part of the customers who pass the rules above. Each customer lands in the same place every time, and raising the share only adds customers, so nobody loses the feature as you roll it out. At 0% nobody gets it yet, which is useful for shipping the code before you switch it on.
These rules only narrow who gets a feature. They never switch on a feature that the minimum rollout channel and Default enabled leave off, and a customer you switched on by hand always keeps it. They do not apply to features controlled by billing, because the customer's plan already decides those, and they do not apply in Development or Staging.
Preview who this reaches shows how many of your customers would get the feature, split by plan, and lets you check one customer and see the reason in plain words. The preview uses what you have typed, before you save, and changes nothing. If you have more than 5,000 customers it counts the first 5,000.
Changing a feature at a set time, with a second pair of eyes
Under the feature list, Scheduled changes lets you change a feature at an exact moment instead of right now, for example to switch on a launch at 09:00 on the day. Choose Schedule a change, pick the feature, what to change, the date and time, and a short reason.
- You pick the time in your own time zone. The page shows it in UTC as well, and everything is stored in UTC, so there is no doubt about when it runs. A change runs within about a minute after its time.
- You can turn a feature on or off by default, activate or deactivate it, roll it out to a share of customers, limit it to certain plans, or clear those limits.
- Until it runs, you can Cancel a change or Change time.
- If a change cannot be applied (for example, a plan you named has since been deleted) it is tried once more a minute later, then marked Failed with the reason. Fix the cause and choose Pick a new time.
Require a second person to approve production changes. Tick the box at the top to switch this on for the app. Then each production change waits for someone other than the person who asked to approve it, and editing a production feature directly is switched off, so every production change goes through this list. Changes to Development and Staging are not affected.
- You cannot approve your own change. If you are the only person with access, leave the box off.
- If the planned time passes before anyone approves, the change is not applied. It shows as "Not applied: approval came too late". Choose Pick a new time to ask again; a different person then has to approve it.
- Whoever changes the time becomes the person who asked, so a different person has to approve the new time.
- Who asked, who approved and when it ran are recorded in the audit log.
Offerings, roles, claims
- Offerings — sellable plans; attach features as
featureKeyorfeatureKey:limit(comma-separated). Use Add offering on the Offerings tab to open the full-page editor (/applications/:id/offerings/new); click a plan name or Edit to update (/applications/:id/offerings/:offeringId/edit). In the platform workspace, offerings use/console/platform/offerings/newand/console/platform/offerings/:offeringId/edit(Production contract only). - Roles — named permission bundles assigned to tenant users.
- Claims — custom JWT claims emitted at sign-in for your app to read.
Edit these tabs with the same environment selector; promote together with features.
Operator tips
- Build in Development, validate in Staging, then Promote to Production — avoid editing Production directly unless hotfixing.
- Use the contract diff view before promotion to catch accidental removals.
- Disabled lifecycle on the parent application blocks tenant access regardless of contract state.
Related
- Application settings — default rollout channel
- Applications — registration and lifecycle