> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corti.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Recipe 6 — Inherit from your own sections to scale across customers/departments

> Keep a canonical section as the single source of truth and create inheriting customer or department variants — improvements to the canonical propagate to every variant.

<Badge className="accent-badge" shape="rounded">Beta</Badge>

← Back to [Customization Cookbook](/textgen/customization-cookbook)

**Scenario:** You have a working `your-hpi` section. Customer A wants telegraphic. Customer B wants narrative. Customer C wants narrative *plus* every line prefixed with a department code. The base content rules should stay shared — only the writing/format diverges.

**What you do:**

1. Keep `your-hpi` as the **canonical base**. Don't change it for the variants.
2. Create variant sections via `POST /documents/sections` with `inheritFromId: <your-section-id>` and override only the diverging fields (e.g. `writingStylePrompt`, `itemFormat`, `outputSchema`).
3. Compose customer-specific templates that reference the appropriate variant for each customer.
4. Route the request to the correct customer template based on tenant/customer context in your product.

```json title="POST /documents/sections — variant inheriting from your own canonical section" expandable theme={null}
{
  "name": "HPI (Customer C — telegraphic)",
  "languages": ["en"],
  "labels": [
    { "key": "customer", "value": "customer-c" },
    { "key": "style", "value": "telegraphic" }
  ],
  "inheritFromId": "<your-section-id>",
  "generation": {
    "instructions": {
      "writingStylePrompt": "Telegraphic; no narrative; clinical abbreviations preferred."
    }
  }
}
```

**Why this lever:** Improvements you make to the canonical `your-hpi` (better `contentPrompt`, refined `outputSchema`) propagate to every customer variant for every field they didn't override. You don't have to update three sections — you update one, and the inheriting variants track.

**Caveat:** Watch the **`outputSchema` override rule** — providing an `outputSchema` on an inheriting section *fully replaces* the parent schema; it is **not** a partial merge. If a variant overrides the schema, parent schema improvements stop propagating to that variant's schema. See [Create a Section — override semantics](/textgen/section-creation).

<Tip>Use `labels` aggressively in this recipe. Tag each variant with a `key:value` label such as `{ "key": "customer", "value": "customer-c" }` so your `LIST /documents/sections?label=customer:customer-c` discovery surface stays clean. The `specialties` field is the right place for clinical-specialty tags — `labels` is for free-form business tags.</Tip>

***

Previous: [Recipe 5 — Your own sections & templates + end-user runtime overrides](/textgen/customization-cookbook/recipe-5-author-with-runtime-overrides) · Next: [Recipe 7 — The full stack](/textgen/customization-cookbook/recipe-7-full-stack)
