12 KiB
Feature Flag Usage Documentation - IFeatureFlagServiceClient.IsEnabledAsync
This document provides a comprehensive overview of all feature flags used throughout the Continuous Improvement codebase via the IFeatureFlagServiceClient.IsEnabledAsync method.
Overview
The application uses feature flags to control functionality on a per-client basis in this multi-tenant system. Feature flags are checked using the IFeatureFlagServiceClient service and are typically scoped to a specific database GUID.
Feature Flag Index
| # | Feature Flag | Description | Section |
|---|---|---|---|
| 1 | ciflexibleexplorationenabled |
Controls access to flexible exploration features for non-SDT employees | Section 1 |
| 2 | enableencounteropportunityintempo |
Controls whether encounter opportunities are enabled in the Tempo interface | Section 2 |
| 3 | ciflexibleexplorationpage3enabled |
Controls access to the flexible exploration information page (third page) | Section 3 |
| 4 | enablepayrollopportunityintempo |
Controls whether payroll opportunities are enabled in the Tempo interface | Section 4 |
| 5 | chargecodebeta |
Controls access to charge code beta features | Section 5 |
| 6 | cibenchmarkingenabled |
Controls benchmarking features in continuous improvement | Section 6 |
| 7 | ciopportunityworkbooks |
Controls opportunity workbook features | Section 7 |
| 8 | networkopportunitiesenabled |
Controls network opportunity features | Section 8 |
| 9 | strategicopportunityforchargecode |
Controls strategic opportunity features specifically for charge codes | Section 9 |
| 10 | ciexplorationpopulationmanagementlaunchesstrategicopportunitywizard |
Controls if the Add Opportunity button on the Exploration Population page launches the Strategic Opportunity Wizard |
Feature Flag Keys and Usage
1. "ciflexibleexplorationenabled"
Purpose: Controls access to flexible exploration features for non-SDT employees
Usage Locations:
AllOpportunitiesController.cs(line 40)ExplorationOpportunitiesController.cs(line 45)
Implementation Pattern:
// C# example
public async Task<IActionResult> SomeAction()
{
if (await _featureFlagServiceClient.IsEnabledAsync("ciflexibleexplorationenabled"))
{
// Code for flexible exploration features
}
else
{
// Fallback or default behavior
}
}
Context: Enables flexible exploration functionality. SDT employees always have access, while client users need this feature flag enabled.
2. "enableencounteropportunityintempo"
Purpose: Controls whether encounter opportunities are enabled in the Tempo interface
Usage Locations:
EncounterOpportunitiesController.cs(lines 90, 175)
Implementation Pattern:
// C# example
public async Task<IActionResult> TempoAction()
{
if (await _featureFlagServiceClient.IsEnabledAsync("enableencounteropportunityintempo"))
{
// Code for encounter opportunities in Tempo
}
else
{
// Fallback to Jazz interface or show message
}
}
Context: Feature flag to enable encounter opportunity functionality in the modern Tempo interface versus legacy Jazz interface.
3. "ciflexibleexplorationpage3enabled"
Purpose: Controls access to the flexible exploration information page (third page)
Usage Locations:
ExplorationController.cs(line 45)
Implementation Pattern:
// C# example
public async Task<IActionResult> ExplorationPageAction()
{
if (await _featureFlagServiceClient.IsEnabledAsync("ciflexibleexplorationpage3enabled"))
{
// Code for the third page of flexible exploration
}
else
{
// Redirect or show less data
}
}
Context: Enables the third page of flexible exploration functionality for enhanced data exploration capabilities.
4. "enablepayrollopportunityintempo"
Purpose: Controls whether payroll opportunities are enabled in the Tempo interface
Usage Locations:
PayrollOpportunitiesController.cs(line 85)
Implementation Pattern:
// C# example
public async Task<IActionResult> PayrollTempoAction()
{
if (await _featureFlagServiceClient.IsEnabledAsync("enablepayrollopportunityintempo"))
{
// Code for payroll opportunities in Tempo
}
else
{
// Fallback to other methods or show message
}
}
Context: Feature flag to enable payroll opportunity functionality in the modern Tempo interface.
5. "chargecodebeta"
Purpose: Controls access to charge code beta features
Usage Locations:
ChargeCodeOpportunitiesController.cs(line 243)
Implementation Pattern:
// C# example
public async Task<IActionResult> ChargeCodeBetaAction()
{
if (await _featureFlagServiceClient.IsEnabledAsync("chargecodebeta"))
{
// Code for charge code beta features
}
else
{
// Hide or disable beta features
}
}
Context: Beta feature flag for charge code opportunities functionality, controlling access to new charge code features.
6. "cibenchmarkingenabled"
Purpose: Controls benchmarking features in continuous improvement
Usage Locations:
- Frontend TypeScript components
- Configuration and peer group functionality
Implementation Pattern:
// TypeScript example
if (featureFlagService.isEnabled("cibenchmarkingenabled")) {
// Code for benchmarking features
} else {
// Alternative code path
}
Context: Enables benchmarking functionality in the CI application, allowing comparison against peer groups.
7. "ciopportunityworkbooks"
Purpose: Controls opportunity workbook features
Usage Locations:
- Referenced in TypeScript interface definitions
- Workbook management components
Context: Feature flag for workbook functionality related to opportunities.
8. "networkopportunitiesenabled"
Purpose: Controls network opportunity features
Usage Locations:
- Frontend navigation and components
- Network opportunity controllers
Implementation Pattern:
// TypeScript example
if (featureFlagService.isEnabled("networkopportunitiesenabled")) {
// Code for network opportunity features
} else {
// Code for standard opportunities
}
Context: Enables network opportunity functionality for multi-client opportunity management.
9. "strategicopportunityforchargecode"
Purpose: Controls strategic opportunity features specifically for charge codes
Usage Locations:
- Frontend configuration components
- Strategic opportunity management
Implementation Pattern:
// TypeScript example
if (featureFlagService.isEnabled("strategicopportunityforchargecode")) {
// Code for strategic opportunities for charge codes
} else {
// Fallback code
}
Context: Enables strategic opportunity functionality specifically for charge code-based opportunities.
10. "ciexplorationpopulationmanagementlaunchesstrategicopportunitywizard"
Purpose: Controls strategic opportunity features specifically for charge codes
Usage Locations:
- Frontend configuration components
- Strategic opportunity management
Implementation Pattern:
// TypeScript example
if (featureFlagService.isEnabled("ciexplorationpopulationmanagementlaunchesstrategicopportunitywizard")) {
// Code to launch strategic opportunities wizard
} else {
// Fallback code
}
Context: Enables the Add Opportunity button on the Exploration Population page to launch the Strategic Opportunity wizard.
Key Controllers Using Feature Flags
| Controller | Feature Flags Used | Purpose |
|---|---|---|
AllOpportunitiesController |
ciflexibleexplorationenabled |
Flexible exploration access control |
ExplorationOpportunitiesController |
ciflexibleexplorationenabled |
Exploration features |
ExplorationController |
ciflexibleexplorationpage3enabled |
Advanced exploration pages |
EncounterOpportunitiesController |
enableencounteropportunityintempo |
Tempo interface integration |
PayrollOpportunitiesController |
enablepayrollopportunityintempo |
Payroll Tempo integration |
ChargeCodeOpportunitiesController |
chargecodebeta |
Beta charge code features |
SettingsController |
All CI area flags | Global feature management |
Frontend Integration
The frontend TypeScript code integrates with feature flags through:
- Navigation Control: Menu items visibility based on feature flags
- Component Rendering: Conditional rendering of UI components
- Service Availability: API service availability checks
- User Interface: Feature-specific UI elements and workflows
Example Frontend Usage
// TypeScript example
async function loadOpportunities() {
if (await featureFlagService.isEnabled("ciflexibleexplorationenabled")) {
// Load flexible exploration opportunities
} else {
// Load standard opportunities
}
}
Database Scope
All feature flags are scoped to specific database GUIDs, enabling per-client feature control in the multi-tenant architecture. This allows different clients to have different features enabled based on their subscription level or beta participation.
Testing Considerations
When testing feature flag functionality:
- Mock the
IFeatureFlagServiceClientin unit tests - Test both enabled and disabled states for each feature
- Verify SDT employee bypass logic where applicable
- Test database GUID scoping for multi-tenant scenarios
Example Test Mock
// C# example using Moq
var featureFlagMock = new Mock<IFeatureFlagServiceClient>();
featureFlagMock.Setup(ff => ff.IsEnabledAsync("ciflexibleexplorationenabled"))
.ReturnsAsync(true);
// Use featureFlagMock.Object in tests
Service Registration
Feature flags are registered in the dependency injection container via the IFeatureFlagServiceClient service, typically configured in the Startup.cs or Program.cs file for the application.
Logging and Monitoring
Many feature flag checks include structured logging to track usage patterns:
// C# example
if (await _featureFlagServiceClient.IsEnabledAsync("ciflexibleexplorationenabled"))
{
_logger.LogInformation("Flexible exploration feature enabled");
}
else
{
_logger.LogInformation("Flexible exploration feature disabled");
}
Maintenance Notes
- All feature flag keys should be documented when added
- Consider feature flag lifecycle and removal strategy for permanent features
- Monitor feature flag usage through logging for analysis
- Ensure consistent naming conventions for new feature flags
- Regularly review and clean up obsolete feature flags
- Update this documentation when new feature flags are added
Feature Flag Lifecycle
- Development: New feature flags are added for experimental or beta features
- Testing: Features are tested with flags enabled/disabled
- Rollout: Gradual enabling of features for specific clients
- Stabilization: Features become stable and widely adopted
- Cleanup: Feature flags are removed once features are permanent
Last Updated: November 2025 Document Version: 1.0 Total Feature Flags Documented: 9