Platform feature flags
How InsightHire platform admins enable capabilities globally and per tenant, with the complete slug catalog.
InsightHire uses a three-layer gating model for premium capabilities. Customer org admins see features only when all relevant layers pass.
Gating layers
flowchart TD
A[Feature request] --> B{Layer 1: Platform kill switch ON?}
B -->|No| X[Hidden everywhere — PLATFORM_OFF]
B -->|Yes| C{Layer 2: Org grant?}
C -->|No| Y[Hidden for org — NOT_GRANTED]
C -->|Yes| D{Layer 3: Org admin toggle?}
D -->|No| Z[Grant OK but org opted out]
D -->|Yes| OK[Feature active — GRANTED]| Layer | Storage | Who controls | Example |
|---|---|---|---|
| 1. Platform kill switch | platform_integration_settings.enabled | InsightHire platform admin | Global off for beta feature |
| 2. Per-tenant grant | org_feature_grants.granted | Platform admin per org | Pilot customer gets custom_pipelines |
| 3. Org admin toggle | Org-scoped settings tables | Customer org admin | Culture profile enabled flag |
Customer-facing gates use isFeatureGrantedForOrg(slug, organizationId) (layers 1 + 2). Layer 3 is feature-specific — e.g. culture fit requires grant and org profile enabled.
Missing grant row = NOT granted (conservative default). Revokes set granted: false instead of deleting rows for audit trail.
Platform admin UI
InsightHire Admin → Integrations & Features (insighthire-admin/app/integrations/page.tsx):
- Global toggle —
trpc.platformAdmin.toggleIntegration({ slug, enabled })flips layer 1 - Tenant Access tab — appears only for feature-flag slugs; lists all customer orgs with grant toggles
- Grant toggle —
trpc.platformAdmin.toggleOrgFeatureGrant({ organizationId, slug, granted })
Supporting procedures:
| Procedure | Purpose |
|---|---|
listIntegrationSettings | All slugs with grantedTenantCount |
listOrgFeatureGrants | Org list for one slug (search by name/domain) |
toggleOrgFeatureGrant | Upsert grant + Redis cache invalidation |
seedIntegrationDefaults | Bootstrap platform_integration_settings rows |
Cache invalidation publishes on Redis channel feature-flags:invalidate so all API replicas drop in-process cache within milliseconds (30s TTL fallback).
FEATURE_FLAG_SLUGS (code constants)
From insighthire-api/src/lib/feature-flags.ts:
| Constant | Slug | Category |
|---|---|---|
MEETINGS_MICROSOFT_TEAMS | meetings_microsoft_teams | Meetings |
MEETINGS_GOOGLE_MEET | meetings_google_meet | Meetings |
CULTURE_FIT_SCORING | culture_fit_scoring | Hiring intelligence |
INSIGHTHIRE_LIVE_INTERVIEWS | insighthire_live_interviews | Meetings |
TALENT_NETWORK | talent_network | Hiring intelligence |
CUSTOM_FIELDS | custom_fields | Hiring intelligence |
JOB_GOVERNANCE | job_governance | Hiring intelligence |
CUSTOM_PIPELINES | custom_pipelines | Hiring intelligence |
STRUCTURED_INTERVIEWS | structured_interviews | Hiring intelligence |
CUSTOM_REPORTS | custom_reports | Hiring intelligence |
DEI_COMPLIANCE | dei_compliance | Hiring intelligence |
CANDIDATE_SURVEYS | candidate_surveys | Hiring intelligence |
Full slug catalog (platform_integration_settings)
Seeded by platformAdmin.seedIntegrationDefaults in platform-admin.ts:
ATS & HRIS
| Slug | Name | Default enabled |
|---|---|---|
greenhouse | Greenhouse | Yes |
lever | Lever | No (coming soon) |
workday | Workday | Yes |
bamboo | BambooHR | No (coming soon) |
Job boards
| Slug | Name | Default enabled | Notes |
|---|---|---|---|
indeed | Indeed | No | Per-position email parsing today |
linkedin | Yes | OAuth + Apply Connect |
Meetings & calendar
| Slug | Name | Grant-gated |
|---|---|---|
meetings_microsoft_teams | Microsoft Teams scheduling | Yes |
meetings_google_meet | Google Meet scheduling | Yes |
Background checks
| Slug | Name | Default enabled |
|---|---|---|
accurate | Accurate Background | Yes |
Per-org credentials in Settings → Integrations; not the same grant model as hiring intelligence flags.
Hiring intelligence (per-tenant grant tab)
| Slug | Name | Customer settings surface |
|---|---|---|
culture_fit_scoring | Culture Fit Scoring | Settings → Culture |
talent_network | Talent Network | Network nav, reject release |
custom_fields | Custom Fields | Settings → Custom Fields |
job_governance | Jobs Governance | Approvals, Intake Forms, Requisitions |
custom_pipelines | Custom Pipelines | Settings → Pipelines, kanban, tasks |
structured_interviews | Structured Interviews | Settings → Interview Kits |
custom_reports | Custom Reports | Report builder, dashboards |
dei_compliance | DEI & Compliance | Settings → Compliance |
candidate_surveys | Candidate Surveys | NPS on stage change, analytics |
Additional grant slug (admin UI set)
| Slug | Name | Notes |
|---|---|---|
insighthire_live_interviews | InsightHire Live | Native Daily.co live interviews |
UI gate reason messages
getFeatureGateForOrg returns:
| Reason | Meaning for support |
|---|---|
PLATFORM_OFF | Feature not launched globally — enable kill switch first |
NOT_GRANTED | Global on, but org not on pilot list — grant tenant access |
GRANTED | Layers 1–2 pass — check layer 3 org toggle if still hidden |
Settings tabs hide silently (no disabled stub) when grant missing.
Typical enablement workflow
- Platform admin enables global switch (
toggleIntegration) - Platform admin grants pilot tenants (
toggleOrgFeatureGrant) - Customer org admin configures feature in Settings
- Recruiters see new nav/tabs within ~30s (cache TTL worst case)
For soft launches (talent_network, culture_fit_scoring), keep global OFF until ready, then grant select tenants before global enable.
Slugs vs integrations
Not every platform_integration_settings row uses per-tenant grants:
| Model | Slugs | Gate |
|---|---|---|
| Feature grant | custom_fields, job_governance, … | org_feature_grants |
| Per-org connection | greenhouse, linkedin, accurate | Org integration credentials in Settings |
| Env + platform config | meetings_* | Grant + recruiter OAuth |
The admin UI Tenant Access tab renders only for FEATURE_FLAG_SLUGS set members.
Customer-facing documentation map
| Slug | Doc |
|---|---|
custom_fields | Custom fields |
job_governance | Job governance |
custom_pipelines | Pipelines & automations |
structured_interviews | Interview kits |
culture_fit_scoring | Settings → Culture (see Roles & permissions) |
dei_compliance / candidate_surveys | Settings → Compliance |
Requesting flags (customers)
Contact InsightHire support or your CSM with:
- Organization name and domain
- Desired slug(s)
- Target go-live date
Platform team enables layer 1 (if needed) and layer 2 for your tenant.
Related docs
- Settings overview — which tabs are gated
- Roles & permissions — flags vs org roles

