# UTIL_FeatureFlag.INT_FeatureFlagStrategy

**Class** · Group: `Feature Flags`

Learn it: [Fast Start - Feature Flags](/fast-start-feature-flags) and [Feature Flags guide](/feature-flags-guide)

<div class="apex-member apex-class">

```apex
global interface UTIL_FeatureFlag.INT_FeatureFlagStrategy
```

**Known Derived Types:** [UTIL_FeatureFlag.INT_UserAwareFeatureFlagStrategy](/reference/apex/util-featureflag-int-userawarefeatureflagstrategy)

The global interface for all feature evaluation strategies. Implement this interface and reference your class from FeatureFlagStrategy__mdt.CustomHandler__c to replace any built-in strategy. This is the recommended escape hatch when the built-in Hierarchical/List Custom Setting or Custom Metadata strategies cause SOQL hot spots: a custom handler can call typed MyCS__c.getInstance(userId) / MyType__mdt.getInstance(name) directly for zero-SOQL platform-cached reads. See the Utilities Guide → "Performance and SOQL Cost".

**Example**

```apex
// Example implementation of a custom strategy
public class MY_Region_Strategy implements UTIL_FeatureFlag.INT_FeatureFlagStrategy
{
    public Boolean isEnabled(FeatureFlag__mdt flag, FeatureFlagStrategy__mdt strategyToEvaluate)
    {
        // Custom logic to enable feature only for users in the 'US'
        Boolean isFeatureEnabled = UserInfo.getCountry() == 'US';
        return isFeatureEnabled;
    }
}
```

</div>

---

## Methods

| Method | Description |
|--------|-------------|
| global abstract [Boolean](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_boolean.htm) [isEnabled](#isenabled)([FeatureFlag__mdt](/reference/metadata/featureflag-mdt) flag, [FeatureFlagStrategy__mdt](/reference/metadata/featureflagstrategy-mdt) strategyToEvaluate) | Evaluates the strategy and determines if the feature should be enabled. |

### isEnabled

<div class="apex-member">

```apex
global abstract Boolean isEnabled(FeatureFlag__mdt flag, FeatureFlagStrategy__mdt strategyToEvaluate)
```

Evaluates the strategy and determines if the feature should be enabled.

**Parameters**

| Parameter | Type | Description |
|-----------|------|-------------|
| `flag` | [FeatureFlag__mdt](/reference/metadata/featureflag-mdt) | The Feature Flag custom metadata record. |
| `strategyToEvaluate` | [FeatureFlagStrategy__mdt](/reference/metadata/featureflagstrategy-mdt) | The specific strategy record to evaluate. |

**Returns** [Boolean](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_boolean.htm) — `true` if the feature is enabled by this strategy, `false` otherwise.

**Example**

```apex
public Boolean isEnabled(FeatureFlag__mdt flag, FeatureFlagStrategy__mdt strategyToEvaluate)
{
    // Check if the strategy's target value matches our condition
    Boolean isTargetMet = strategyToEvaluate.TargetValue__c == 'Some_Value';
    return isTargetMet;
}
```

</div>
