Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.swisstools.dev/llms.txt

Use this file to discover all available pages before exploring further.

Groups let you model the entities in your system that should have independent flag values. Where a global flag applies uniformly across your entire project, a group flag applies within a named group (such as “Organization” or “User Tier”), and each member of that group — called a record — can have its own override values for every flag in the group. This makes groups the right tool for per-customer feature gating, tiered plan access, or any scenario where different entities need different flag states.
Use groups whenever you need to ask “does this specific customer have access to this feature?” rather than “is this feature on for everyone?” Each record maps to one entity in your system (an organization, a user, a team) and its ID is what you pass to the SDK when resolving flags.

Data model

Group: "Organization"                     (key: organization, prefix: org)
  ├── Flag: "advanced-reporting"          (default: off)
  ├── Flag: "api-access"                  (default: off)
  └── Records:
        ├── Record: "acme-corp"           (id: org-0ujsswThIGTUYm2K8FjOOfXtY1K)
        │     ├── advanced-reporting: true
        │     └── api-access: false
        └── Record: "widgets-inc"         (id: org-0ujsswThIGTUYm2K8FjOOfXtY2K)
              ├── advanced-reporting: true
              └── api-access: true
When you resolve flags for org-0ujsswThIGTUYm2K8FjOOfXtY1K via the SDK, you get back exactly what acme-corp has been granted — independent of any other record in the group.

Groups

A group defines a category of entity. It has three fields:
FieldDescription
NameDisplay name shown in the dashboard (e.g. Organization).
KeyIdentifier used when querying the group via the API (e.g. organization). Must be unique within the project.
PrefixA 2–5 character lowercase alphanumeric string prepended to every record ID in this group (e.g. org). Must be unique within the project.
Auto-generated record IDs take the form <prefix>-<ksuid>, for example org-0ujsswThIGTUYm2K8FjOOfXtY1K. This makes IDs self-describing and easy to route to the correct group at a glance. The prefix is derived from the group name automatically when you type it, but you can customize it. Alternatively, you can supply your own ID when creating a record (see below) to align records with your system’s entity IDs.

Creating a group

1

Open the Groups tab

Navigate to Feature Flags in your project, then click the Groups tab.
2

Open the creation dialog

Click New Group.
3

Enter group details

Fill in the Name (e.g. Organization), Key (e.g. organization), and Prefix (e.g. org). The prefix must be 2–5 lowercase alphanumeric characters and cannot be changed once records exist under the group.
4

Create the group

Click Create. The group appears in the Groups table.
Once the group exists, click Open to enter the group detail page where you manage its flags and records.

Group flags

Group flags are the flags you define within a group. Unlike global flags — which have a single enabled/percentage state — group flags carry default values that apply to any record that does not have an explicit override.
FieldDescription
NameDisplay label for the flag (e.g. Advanced Reporting).
KeyMachine-readable key returned by the SDK (e.g. advanced-reporting).
Default enabledThe fallback state used for records that have no explicit value set.
Default percentageThe fallback percentage (0–100) for records without an explicit value.
Add flags to a group from the Flags tab inside the group detail page. Use the New Flag button, fill in the name, key, and defaults, then click Create.

Records

A record represents one instance of the group entity — one organization, one user, one tenant. Creating a record registers it in Swisstools and gives it a permanent ID that you use in SDK calls. Records have an optional Name field for display purposes in the dashboard. The ID is set once at creation and cannot be changed afterward: either supply your own stable identifier (e.g. your internal user or customer ID), or leave it blank to let Swisstools generate a <prefix>-<ksuid> value. You can copy it from the Records table using the copy icon next to the ID.

Adding records

From the group detail page, click the Records tab, then New Record. Optionally supply your own ID and a name, then click Create. The new record’s ID appears in the table immediately. Via the API, omit the id field to have one generated for you.

Setting flag values per record

From the Records table, click the sliders icon next to a record to open the flag values panel. You see all flags defined in the group. For each flag you can:
  • Set a value — choose enabled or disabled and an optional percentage. This overrides the group flag’s default for this record only.
  • Clear a value — remove the override so the record falls back to the group flag’s default.
Records that have no override for a flag inherit the group flag’s defaultEnabled and defaultPercentage values automatically when resolved via the SDK.

Editing and deleting

Groups — use the pencil icon in the Groups table to update the name, key, or prefix. Deleting a group permanently removes it along with all its flags, records, and record values. Group flags — use the pencil or trash icon in the group detail Flags tab. Deleting a flag clears all per-record values for that flag. Records — use the pencil or trash icon in the Records tab. Deleting a record permanently invalidates its ID for SDK lookups and removes all its stored flag values.