No results for ""
EXPAND ALL
  • Home
  • API docs

GIVE DOCS FEEDBACK

Flag templates

Read time: 5 minutes
Last edited: Jun 12, 2024

Overview

This topic explains the different types of flags available in LaunchDarkly, and how to customize flag templates. Flag templates are project-wide default settings for different types of flags.

Available flag templates

LaunchDarkly supports the following types of flag templates:

  • Custom flags
  • Release flags
  • Kill switch flags
  • Experiment flags
  • AI prompt flags
  • AI model flags
  • Migration flags

Modifying flag templates

Modifying flag templates is an Admin-only feature

You can only modify flag templates if you're a LaunchDarkly Admin or Owner. If you need to make changes to one flag, you may be able to make the changes you need in the flag's Settings tab. To learn more, read Other flag settings.

LaunchDarkly projects have groups of default settings, called "templates," for each type of flag. When you create a flag from a template, that template's default settings appear as pre-set configuration options.

You can modify default flag templates. LaunchDarkly applies those default settings to new flags of the same template type within the project. Updated default settings only apply to flags created after you modified the default settings. If you change a flag template's default settings, LaunchDarkly does not retroactively apply the new defaults to existing flags.

To modify a flag template:

  1. Click the project dropdown.
The project dropdown.
The project dropdown.
  1. Select Flag settings. The "Flag settings" screen appears.
  2. In the "Flag defaults" section, select the SDKs using Mobile Key and SDKs using Client-Side ID checkboxes to determine whether new flags should be available to mobile and/or client-side SDKs.
  3. Click Edit on the flag template you wish to modify and follow the section for that flag template:

Custom flag template settings

This section lets you customize the default template settings for custom flags. Here's how:

  1. In the "Flag templates" section, click Edit.
  2. Choose Yes or No to mark all flags of this template type as temporary or permanent.
  3. In the "Variations" section, edit the flag variation Names.
  4. In the "Default variations" section, choose which default variations to serve when the flag is toggled On or Off.
  5. In the "Tags" section, type to add tags to each new flag by default.
  6. Click Save.

Verify that the updated default template settings are correct by navigating to the flags list and creating a new flag of this template type.

Release flag template settings

This section lets you customize the default template settings for release flags. Here's how:

  1. In the "Flag templates" section, click Edit.
  2. Choose Yes or No to mark all flags of this template type as temporary or permanent. Release flags are usually temporary.
  3. In the "Variations" section, edit the flag variation Names.
  4. In the "Default variations" section, choose which default variations to serve when the flag is toggled On or Off.
  5. In the "Tags" section, type to add tags to each new flag by default.
  6. Click Save.

Verify that the updated default template settings are correct by navigating to the Feature flags list and creating a new flag of this template type.

Kill switch flag template settings

This section lets you customize the default template settings for kill switch flags. Here's how:

  1. In the "Flag templates" section, click Edit.
  2. Choose Yes or No to mark all flags of this template type as temporary or permanent. Kill switch flags are usually permanent.
  3. In the "Variations" section, edit the flag variation Names.
  4. In the "Default variations" section, choose which default variations to serve when the flag is toggled On or Off.
  5. In the "Tags" section, type to add tags to each new flag by default.
  6. Click Save.

Verify that the updated default template settings are correct by navigating to the Feature flags list and creating a new flag of this template type.

Experiment flag template settings

This section lets you customize the default template settings for experiment flags. Here's how:

  1. In the "Flag templates" section, click Edit.
  2. In the "Tags" section, type to add tags to each new flag by default.
  3. Click Save.

Verify that the updated default template settings are correct by navigating to the Feature flags list and creating a new flag of this template type.

AI prompt flag template settings

This section lets you customize the default template settings for experiment flags. Here's how:

  1. In the "Flag templates" section, click Edit.
  2. Choose Yes or No to mark all flags of this template type as temporary or permanent.
  3. In the "Variations" section, edit the flag variation Names.
  4. In the "Default variations" section, choose which default variations to serve when the flag is toggled On or Off.
  5. In the "Tags" section, type to add tags to each new flag by default.
  6. Click Save.

Verify that the updated default template settings are correct by navigating to the Feature flags list and creating a new flag of this template type.

AI model flag template settings

This section lets you customize the default template settings for experiment flags. Here's how:

  1. In the "Flag templates" section, click Edit.
  2. Choose Yes or No to mark all flags of this template type as temporary or permanent.
  3. In the "Variations" section, edit the flag variation Names.
  4. In the "Default variations" section, choose which default variations to serve when the flag is toggled On or Off.
  5. In the "Tags" section, type to add tags to each new flag by default.
  6. Click Save.

Verify that the updated default template settings are correct by navigating to the Feature flags list and creating a new flag of this template type.

Migration flag template settings

This section lets you customize the default template settings for migration flags. Here's how:

  1. In the "Flag templates" section, click Edit.
  2. In the "Tags" section, type to add tags to each new flag by default.
  3. Click Save.

Verify that the updated default template settings are correct by navigating to the flags list and creating a new flag of this template type.