---
title: Dynamic Configuration
description: >-
  Change application behavior with feature flag configuration instead of code
  deployments.
breadcrumbs: Docs > Feature Flags > Use Cases > Dynamic Configuration
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Dynamic Configuration

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com, us2.ddog-gov.com

{% alert level="danger" %}
This product is not supported for your selected [Datadog site](https://docs.datadoghq.com/getting_started/site.md). ({% placeholder "user-datadog-site-name" /%}).
{% /alert %}

{% /callout %}

A feature flag becomes **dynamic configuration** when you store application settings in its variants instead of code. Rather than hardcoding a value and deploying a new build to change it, you update the variant in Datadog and your application reads the new value on the next SDK refresh. Product, marketing, and operations teams can update strings, numbers, or JSON-backed settings directly, without involving engineering.

## Set up a JSON configuration flag{% #set-up-a-json-configuration-flag %}

1. Navigate to [**Create Feature Flag**](https://app.datadoghq.com/feature-flags/create).
1. In the **Variants** section, set the variant type to **JSON**.
1. Optionally add a [JSON Schema](https://json-schema.org/overview/what-is-jsonschema) to validate variant values. Datadog recommends adding a schema to catch invalid values early.
1. Add variants with values that conform to the schema, and give each a descriptive name.

{% image
   source="https://docs.dd-static.net/images/feature_flags/dynamic_config_json_variants.ed256118c809bdbc7bb65d2d00287417.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/feature_flags/dynamic_config_json_variants.ed256118c809bdbc7bb65d2d00287417.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="The Variants section of the create flag form showing a JSON schema and two variants: All items price asc and In stock top rated." /%}

## Next steps{% #next-steps %}

After your flag is set up, you can use it as a foundation for more advanced workflows:

- **Target by segment**: Use targeting rules to serve different configuration values to different user segments — for example, serving different sort defaults by region or subscription tier.
- **Roll out gradually**: Use a [progressive rollout](https://docs.datadoghq.com/feature_flags/use_cases/progressive_rollouts.md) to incrementally expose subjects to a new configuration variant, and roll back immediately if something goes wrong.
- **Run an experiment**: Add an [experiment](https://docs.datadoghq.com/experiments.md) targeting rule to serve different variants to different groups and measure the impact on your key metrics.
