Skip to main content

Inheritance Patterns

Share one feature catalog across several apps without copying flags by hand.

Toggly models this as a parent-child (base and inheriting) application relationship. The parent owns the feature list. Children evaluate the same keys with their own environments and targeting.

Parent-child applications​

A base application (parent) holds the shared feature definitions. An inheriting application (child) links to that base.

  • Children do not have their own Features page. Create, rename, and delete flags on the parent.
  • Adding or removing a flag on the parent cascades to every inheriting app.
  • Inheritance is one level deep: a base application cannot itself inherit from another app. Bases and children must belong to the same team.

Set up inheritance​

When creating an app:

  1. Open Create Application
  2. Expand Advanced Settings
  3. Under Inherit features from, pick the base application
  4. Finish creating the app

On an existing app:

  1. Open App Settings
  2. Find the Inheritance section
  3. On a standalone app, Add inheriting applications (or set this app to inherit from a base)
  4. On a child, Change base application or unlink to stand alone

Unlinking snapshots the current parent definitions onto the child so it becomes a standalone catalog. Environment filter state is kept as-is.

Visual inheritance tree​

The Inheritance section is the visual tree for that app:

  • A Base badge and the Inheriting applications list show children of this parent
  • An Inheriting badge and the Base application link show this child's parent

Open a listed app's settings to walk the tree. There is no separate hierarchy page.

Cascading flags and child overrides​

Shared flags cascade from the parent: children receive the same keys, names, descriptions, and client-SDK visibility.

Each child still has its own environments. Targeting, enablement, and rollouts live on the child's environment — matching keys keep their existing filter state when you attach inheritance. That is the child override: same catalog, different environment configuration.

You cannot add, edit, or delete feature definitions on a child while it inherits. Change the catalog on the parent.

When to clone vs inherit​

Inherit when several products should share one flag list (web + mobile, or a suite of services) and you want catalog changes to cascade.

Clone when you need an independent copy. From App Settings, Clone Application duplicates features, experiments, metrics, segments, and environments into a new app. After the copy, the two catalogs diverge.

Use inherit for an ongoing shared catalog. Use clone for a one-time starting point.

Best Practices​

  1. Pick one parent per shared catalog; do not nest bases
  2. Override on the child environment, not by duplicating flags
  3. Unlink only when the child must own its catalog
  4. Keep environments aligned with each child's deploy stages — see Environments

Next Steps​