## Releases management with Frontegg's feature flags With Frontegg's feature flags, you can roll out features gradually to select user groups, such as beta testers or specific plan tiers, ensuring a smooth launch. They also allow for A/B testing, providing valuable insights into user engagement, and offer the ability to instantly disable features if issues arise. Whether targeting specific regions or time-limited events, feature flags streamline releases while minimizing risks and maximizing user satisfaction. Frontegg's feature flagging system uses the `isEntitledTo` query to manage access, wrapping certain parts of your application with permissions based on a user's associated attributes. This approach ensures that only designated users can access and test new features, providing a controlled and secure testing environment. ### Getting started with feature flags Feature flags are built atop existing features. So, to 'flag' a feature, you first need to create one in the features dashboard. As a quick reminder, the Features tab is located in [ENVIRONMENT] → Entitlements → Features. Learn more about creating features [here](/ciam/guides/authorization/entitlements/feature-based/features). br ![Flags dashboard](/assets/flags-dashboard.08070021d4cb51b4028c8292fff0db7b0a60bacbe1f6a744bff7405aefb3b913.0c1bbddb.png) br ### Creating a new feature flag To create a new feature flag, go to [ENVIRONMENT] → Entitlements → Feature Flags**. Press the Create feature flag button and use the drop-down menu to choose the feature you want to flag from your features list. br ![feature-flags](/assets/create-new-flag.24fcf16fddce488d8637efce6f4a679a523e9015b3ef8bbfb9fa7a99cf13a6a5.0c1bbddb.png) br ![feature-flags](/assets/new-flag-description.c3c6387cde2a07e0a9a10e3c2c56d6bde311373dc88efa5d0ef58ff873ce072e.0c1bbddb.png) br Feature limit Note that you can only use **one** flag per **feature**. A flag cannot be linked to multiple features. ### Feature flag settings Each feature flag has a Settings and Targeting tab. The Settings tab includes fields like the flag's name and associated features while the Targeting tab includes the targeting rules you create for your flag. br ![feature-flags](/assets/flag-settings.37bc0eed54053421128e9b5af5fdefa4821085111d5e4e69288dcfcbf21d66ed.0c1bbddb.png) br ![feature-flags](/assets/flag-settings-2.4f5ce9069b83f5f9d0a1b744e7309f70b59f109dda30212146bc4b026004f60f.0c1bbddb.png) br ### Adding targeting rules To create designated access to a feature flag, go to the Targeting tab, click "Add new targeting rules," and select the attributes you wish to apply for that specific flag. br ![targeting-rules](/assets/targeting-rules-1.fb4f5a94c85ae7ff62d8b16cf1bcb67f635f23f60b9096e22ed5b98749d293cc.0c1bbddb.png) br #### Attributes for targeting The default attributes we currently support for feature flagging are: email-verified (`frontegg.emailVerified`), user ID (`frontegg.userId`), tenant Id (`frontegg.tenantId`), and email (`frontegg.email`). These attributes are included in the drop-down attributes menu. In addition to Frontegg's attributes, **Custom attributes** can also be used. Learn more about custom attributes in the next section. br ![targeting-rules](/assets/targeting-json.eab7755d8f5b9a9cf9d569f3dd8190b32e4cef7b05e43ce0a19434ac1aff416e.0c1bbddb.png) br #### Custom attributes You have the flexibility to create custom attributes that for rule-based/feature flagging purposes. When creating a custom attribute, the attribute **Key** will be used when you insert it in the targeting rules field (see below). ##### JWT attributes In addition to custom attributes and Frontegg's default attributes, you can target attributes from the user's JWT. Since we flat the `jwt` object, you can access its nested properties, including arrays. For example, if you store information such as the user's date of birth as `dateOfBirth`, you can target this attribute in your feature flagging engine by inserting a `jwt.dateOfBirth` in the attribute field. For JWT attributes, you need to use the `jwt` prefix. br ![jwt](/assets/jwt-attributes.a1eac14531b541ecd2acbc81b21ed882e521eee6086da98a0c293d91ca8c1606.0c1bbddb.png) br ### Feature flag limitations The ability to create Feature Flags has the following limitations: - Each environment (developement/staging/qa/production) is limited to **500 feature flags** ([Contact us](https://support.frontegg.com/hc/en-us/requests/new) if you need to set more flags). - Each Feature Flag is limited to up to **10 Rules** - Each Rule is limited to up to up to **10 conditions** - The Attribute field is limited to up to **100 characters** - The Value/Segment field can contain up to **25 items** - Each Value/Segment is limited to up to **50 characters**