Forge Feature Flags is now available as part of Forge Early Access Program (EAP). To start testing this feature, sign up using this form.
Forge Feature Flags is an experimental feature offered to selected users for testing and feedback purposes. This feature is unsupported and subject to change without notice. Do not use Forge Feature Flags in apps that handle sensitive information and customer data. The Feature flags EAP is fully functional in development, staging, and production environments.
Note: Feature flags are not available in Atlassian Government Cloud or FedRAMP environments. See, Limitations.
This page explains the fundamental concepts behind feature flags and how they work in the Forge platform.
Feature flags (also known as feature toggles or feature switches) are a software development technique that allows you to enable or disable features in your application without deploying new code. They provide a way to control feature rollouts, conduct experiments, and manage deployments safely.
Key benefits:
Feature flags work by separating feature deployment from feature activation:
Simple on/off switches for features. Perfect for major feature rollouts.
1 2// Example usage if (featureFlags.checkFlag(user, 'new-dashboard-layout', false)) { // Show new dashboard } else { // Show old dashboard }
Use cases:
Gradual feature releases to specific percentages of users.
1 2// Initialize the feature flags SDK const featureFlags = new ForgeFeatureFlags(); await featureFlags.initialize({ environment: "development" }); // target based on installation context i.e. 25% of sites const user = { identifiers: { installContext: context?.installContext, } }; const enabled = featureFlags.checkFlag(user, 'beta-feature', false); if (enabled) { // Show beta feature to 25% of sites }
Use cases:
Note: During EAP, percentage updates must be adjusted manually.
Enable features for specific users or organizations.
1 2// Initialize the feature flags SDK const featureFlags = new ForgeFeatureFlags(); await featureFlags.initialize({ environment: "staging" }); const user = { identifiers:{ accountId: context?.principal?.accountId, }, attributes: { license: licenseValue, // "ACTIVE", "INACTIVE", "TRIAL" } }; // Example: Premium user targeting const result = featureFlags.checkFlag(user, 'premium-analytics');
Use cases:
Different behavior across development, staging, and production environments.
1 2// Example: Debug mode in development // Initialize the feature flags SDK const featureFlags = new ForgeFeatureFlags(); await featureFlags.initialize({ environment: "development" }); if (featureFlags.checkFlag(user, 'debug-mode')) { console.log('Debug information'); }
Use cases:
One of the most important concepts developers need to understand when working with feature flags is ID type. The ID type determines the scope and context for flag evaluation, affecting how flags are targeted and evaluated.
The installContext ID type targets feature flags at the app installation level. This means the flag evaluation is tied to where your Forge app is installed, not to individual users.
Key characteristics:
When to use installContext:
1 2// Initialize the feature flags SDK const featureFlags = new ForgeFeatureFlags(); await featureFlags.initialize({ environment: "development" }); const user = { identifiers:{ installContext: context?.installContext, }, attributes: { license: licenseValue, // "ACTIVE", "INACTIVE", "TRIAL" } }; // Example: Enable premium dashboard for specific installations const result = featureFlags.checkFlag(user, 'premium-dashboard-v2'); // This evaluates based on the installation context // All users in this installation will see the same result
Real-world example: Your app is installed on three different Jira sites:
The accountID ID type targets feature flags at the individual user level using Atlassian account IDs. This enables precise user-based targeting and personalization.
Key characteristics:
When to use accountID:
1 2// Initialize the feature flags SDK const featureFlags = new ForgeFeatureFlags(); await featureFlags.initialize({ environment: "development" }); const user = { identifiers:{ accountId: context?.principal?.accountId, }, attributes: { license: licenseValue, // "ACTIVE", "INACTIVE", "TRIAL" } }; // Example: Enable beta features for specific users const result = featureFlags.checkFlag(user, 'beta-user-interface'); // This evaluates based on the specific user
Real-world example: Within the same installation, different users see different features:
| Scenario | ID Type | Reason |
|---|---|---|
| Enable premium features for enterprise customers | installContext | Organization-level decision |
| Rollout new UI to 10% of users | accountID | User-level randomization |
| Beta test with specific organizations | installContext | Site-wide testing |
| Personalized dashboard layouts | accountID | User-specific preferences |
| Site-specific integrations | installContext | Installation-level configuration |
| A/B testing user flows | accountID | Individual user tracking |
installContext evaluation:
1 2// Initialize the feature flags SDK const featureFlags = new ForgeFeatureFlags(); await featureFlags.initialize({ environment: "development" }); const user = { identifiers:{ installContext: context?.installContext, } }; const result = featureFlags.checkFlag(user, 'org-wide-feature');
accountID evaluation:
1 2// Initialize the feature flags SDK const featureFlags = new ForgeFeatureFlags(); await featureFlags.initialize({ environment: "development" }); const user = { identifiers:{ accountId: context?.principal?.accountId, } }; const result = featureFlags.checkFlag(user, 'user-specific-feature');
Best practices:
Developers can target feature flags based on app context using predefined attributes. The following attributes are supported:
| Attribute name | Type | Description | Example value(s) |
|---|---|---|---|
| installContext | string | The ARI identifying the cloud or Atlassian app context of this component installation. | ari:cloud:ecosystem::app/1234-abcd-5678-efgh |
| accountId | string | The principal containing the Atlassian ID of the user that interacted with the component. | 5b10ac8d82e05b22cc7d4ef5 |
| appVersion | string | The version of the app. | 1.2.3 |
| license | string | Contains information about the license of the app. This field is only present for paid apps in the production environment. license is undefined for free apps, apps in DEVELOPMENT and STAGING environments, and apps that are not listed on the Atlassian Marketplace. | ACTIVE, INACTIVE, TRIAL |
| capabilitySet | string | The capability level of the app license. | capabilityAdvanced, capabilityStandard |
Basic example using predefined values:
1 2// Initialize the feature flags SDK const featureFlags = new ForgeFeatureFlags(); await featureFlags.initialize({ environment: "development" }); const user = { identifiers: { installContext: "ari:cloud:ecosystem::app/1234-abcd-5678-efgh", accountId: "5b10ac8d82e05b22cc7d4ef5" }, attributes: { appVersion: "1.2.3", license: "ACTIVE", capabilitySet: "capabilityAdvanced" } }; const isEnabled = featureFlags.checkFlag(user, "new-feature");
If the predefined attributes don't meet your needs, you can use custom attributes for targeting.
Here's a quick demonstration of how to create custom attributes in the Developer Console:

Basic example showing custom attributes:
1 2// Initialize the feature flags SDK const featureFlags = new ForgeFeatureFlags(); await featureFlags.initialize({ environment: environmentType?.toLowerCase() || "development" }); const user = { identifiers: { installContext: context?.installContext, }, attributes: { issues: 4 // Number of issues in a Jira board } }; const isEnabled = featureFlags.checkFlag(user, "new-feature");
Creation → Configuration → Evaluation → Cleanup
Define the flag in Developer Console with:
Set up rules, targeting, and rollout percentages:
App checks flag status at runtime:
featureFlags.checkFlag(user, flagId)Track flag usage and performance:
Remove flags when no longer needed:
team-dashboard-redesignDuring the Early Access Program, the following features are not available:
For complete details, see Limitations.
Rate this page: