Getting Started

Core Concepts

ConfigDirector's core concepts and data model

Data Model

Data model An organization has projects. Each project has environments, configs, and segments. Each environment has SDK keys and contexts. Targeting rules are defined for each config in each environment, and can use segments. OrganizationProjectsEnvironmentsConfigsSegmentsTargeting RulesSDK KeysContexts

Organization

  • All entities exist and are managed within an organization
  • Users can belong to multiple organizations. If you belong to multiple organizations, when you visit your user profile you will see an option to switch your active organization.

Projects

  • Projects are a way to organize related groups of configs together. They can be analogous to a product or application, to a product team, or however you'd like to use them.
  • Configs belong to projects
  • Each project defines an arbitrary number of environments. By default, the Test and Production environments are created automatically.
  • An organization can have many projects. On the Free option there is a limit on how many projects you can create, see Pricing and billing.
  • A project can be protected from being deleted, see Deletion protection. Projects created in the dashboard start protected.

Environments

  • Each project can have an arbitrary number of environments. However, we recommend to match the environments in your ConfigDirector project to the deployable environments for your application. The Test and Production environments are created automatically for each project.
  • Targeting rules for configs exist within an environment
  • Client and server SDK keys belong to an environment. This means your application will need to configure the corresponding SDK key for each environment it is deployed to. Usually, this means providing the SDK keys via environment variables in your application.
  • When you provide a context via an SDK, that context will exist within that environment (the environment the SDK key belongs to).
  • An environment with Live environment turned on in its settings is one that serves real traffic, such as Production. ConfigDirector uses it to judge a config's lifecycle and to decide which environments start protected from deletion.
  • An environment can be protected from being deleted, see Deletion protection. Live environments created in the dashboard start protected.

Deletion protection

  • Deletion protection is designed to prevent accidental deletion of a project or environment. While it is on, nobody can delete that project or environment, whether from the dashboard, the Admin API, Terraform, agent skills, etc.
  • Deletion protection can only be turned on or off from the dashboard.
  • A project created in the dashboard starts with deletion protection on, and so does every live environment created in the dashboard, including the Production environment a new project starts with. Your organization's first project and its Production environment start protected too.
  • Projects and environments created via the Admin API (including via Terraform, CLI, MCP, and agent skills), has deletion protection off.
  • A protected environment also protects its project: a project cannot be deleted while any of its environments has deletion protection on.
  • To update deletion protection for a project, open the project's Project details tab and use the switch in the Deletion protection section. It saves on its own. To update it for an environment, open the project's Environments tab, pick the environment, flip Protect this environment from deletion, and click Save. Anyone who can edit the project or environment can update it. The Admin API, the MCP server, and Terraform report the setting but cannot update it.
  • While deletion protection is on, the dashboard replaces the Delete button with a note saying where to turn it off, and a delete request through the Admin API, the MCP server, or Terraform is refused with a message naming where to turn it off.

Configs

  • Configs are an individual instance of a configuration value, feature flag, kill switch, or experiment.
  • Configs belong to projects, and each project can have an arbitrary number of configs. On the Free option there is a limit on the total number of configs across your organization, see Pricing and billing.
  • The value returned by a config for any given environment is defined via targeting rules.

Targeting Rules

  • Each config, has a set of targeting rules for each environment defined in that project
  • In each environment, the targeting rules end with a default targeting rule (the catch-all or fallback rule) whose value is returned when no other rule matches
  • Targeting rules can have many rules with one or multiple conditions in each rule, as well as many percentage based rollouts.
  • A condition tests either one attribute of the context (its identifier, its context kind, its name, a trait, the app name, or the app version), or whether the context is in a segment. Every condition of a rule must match for the rule to apply.
  • A context kind condition uses equals, does NOT equal, is one of, or is NOT one of. For example, context.kind equals device matches only device contexts, and a context sent without a context kind is tested as user.
  • A trait that holds true or false can be tested with "is true" or "is false".
  • A percentage rollout assigns each context by its context kind and identifier, so user 42 and device 42 can receive different values. Users keep the values they already receive, whether the application leaves the context kind out or sets it to user, so starting to use context kinds does not reshuffle a rollout.
  • Text and array conditions are case-sensitive. For example, a condition context.traits /country is one of US does not match a context whose country trait is us. If your application sends values in more than one casing, either normalize them before passing them to the SDK or list every casing as a target value.
  • While editing the rules you can check which value a given context would receive, and why, with the targeting rules tester
  • To use the same rules in another environment, open that environment's rules, click Copy rules from… and pick the environment to copy from. Its saved rules and default targeting rule value replace the ones in the editor. Nothing changes until you click Save, so you can review or adjust the copied rules first.

Segments

  • A segment is a named set of users, such as beta testers, defined once per project and used by the targeting rules of any config in that project. See Segments.
  • A segment's definition applies in every environment, unless an environment overrides it with its own
  • Editing a segment applies right away to every config whose targeting rules use it

Contexts

  • A context is the user or other entity a config is evaluated for, such as a device, an organization, or a tenant
  • Contexts are provided via the SDKs and belong to the environment that matches the SDK key being used
  • Contexts may contain id, kind, name, and traits. The traits is an arbitrary JSON object
  • The context kind says what the context represents, such as a user or a device. Leaving it out means user. The dashboard suggests user, device, organization, tenant, and listing, and you can use any other kind that fits your application
  • A context kind is 1 to 64 lowercase letters, digits, dashes, or underscores
  • A context is identified by its context kind and identifier together, so user 42 and device 42 are separate contexts, each with its own evaluation history
  • A context with an invalid context kind is ignored: the SDK logs an error, and configs are evaluated as if no context had been given
  • All of the attributes of a context may be used in targeting rules
  • Deleting a context on the Contexts page removes it right away. Within an hour, its tracked events and experiment exposures are also deleted, and its identifier is erased from its evaluations and connections. Its entries on the Live feed expire within 24 hours. Counts, experiment results and monthly active users stay as they are. If your applications send the context again, it comes back as a new context

SDK Keys

  • SDK keys belong to and identify an environment within a project when using any of our SDKs
  • There are client and server SDK keys. The documentation for each SDK will note which key should be used.
  • Each environment can have up to five client SDK keys and five server SDK keys
  • Server SDK keys are considered a secret. Server SDKs download the targeting rules in order to be able to evaluate targeting rules for any context in memory without needing to reach ConfigDirector servers over the network for each evaluation.
  • Since targeting rules may contain private or proprietary information, the server SDK key should be treated as a sensitive password
  • Client SDK keys are not considered sensitive. This is because client SDKs only receive the final evaluated values.
Do NOT store secret or sensitive values, such as passwords, API keys, private keys, etc., in config values. ConfigDirector is not designed to be a secrets vault and does not provide the level of security controls required to guard secret or sensitive information.