> ## 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 7 — The full stack: own canonical + customer inheritance + end-user runtime override

> Combine a canonical baseline, customer-specific inheriting variants, and per-call runtime overrides — the most operational recipe, for multi-customer SaaS at scale.

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

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

**Scenario:** Production-grade ambient documentation for a multi-customer SaaS. You need a governed baseline, customer-specific tuning, *and* per-encounter clinician control all at once.

**What you do (layer-by-layer):**

| Layer                                        | Resource                                                                                                      | Purpose                                                        |
| :------------------------------------------- | :------------------------------------------------------------------------------------------------------------ | :------------------------------------------------------------- |
| **1. Canonical**                             | `your-hpi` (and other canonical sections)                                                                     | Your stable, opinionated baseline. Versioned, published.       |
| **2. Customer variant (inherits canonical)** | `your-hpi-customer-A` (and others) — `inheritFromId: your-hpi` with customer-specific writing style or schema | Persistent per-customer variant; tracks canonical improvements |
| **3. Customer template**                     | `your-followup-customer-A` — composes the customer's variant sections                                         | Stable, per-customer composition                               |
| **4. Runtime override**                      | `POST /documents` Path 2 against the customer template, with per-call overrides                               | Last-mile clinician/UI tweaks                                  |

The request looks the same as [Recipe 5](/textgen/customization-cookbook/recipe-5-author-with-runtime-overrides) — what changes is the template you're targeting:

```json title="POST /documents — full stack" expandable theme={null}
{
  "outputLanguage": "en-US",
  "interactionId": "<your-interaction-id>",
  "templateRef": {
    "templateId": "<your-template-id>",
    "overrides": {
      "sections": [
        {
          "sectionId": "<your-section-id>",
          "generation": {
            "instructions": {
              "writingStylePrompt": "Use second person for this encounter; this is a return visit and the patient prefers direct address."
            }
          }
        }
      ]
    }
  }
}
```

**Why this lever:** Every concern lives at the right layer. Corti improvements flow into your canonical sections; canonical improvements flow into customer-inheriting variants; customer baselines flow into per-request renderings — and your end users still get the last word per encounter.

**Caveat:** This is the most operational of the recipes — three layers of resources to manage. Adopt it only when the value of per-customer baselines is clear; otherwise [Recipe 5](/textgen/customization-cookbook/recipe-5-author-with-runtime-overrides) (own + runtime overrides) is simpler.

***

Previous: [Recipe 6 — Inherit from your own sections to scale](/textgen/customization-cookbook/recipe-6-inherit-your-own) · Back to [Customization Cookbook](/textgen/customization-cookbook)
