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

# Data

> The registry-driven view/table model, data_view_list, data_query, row writes, and view management.

Concierca AI exposes your business data (customers, orders, products, leads, videos, …) through a **registry-driven view model**. There are no hardcoded per-table endpoints — everything is discovered and queried generically.

Full per-table field definitions — what each source is, how it gets its data, and what every column means — live in the **Data Model** section: [Orders](/for-agents/data-model/orders), [Order Line Items](/for-agents/data-model/order-line-items), [Customers](/for-agents/data-model/customers), [Products](/for-agents/data-model/products), [Suppliers](/for-agents/data-model/suppliers), [Purchase Orders](/for-agents/data-model/purchase-orders), [Procurement Config](/for-agents/data-model/procurement-config), [Meeting Notes](/for-agents/data-model/meeting-notes), [Product Demand](/for-agents/data-model/product-demand), [Procurement Queue](/for-agents/data-model/procurement-queue), [Customer Reorder Due](/for-agents/data-model/customer-reorder-due), [Family Trend](/for-agents/data-model/family-trend), [Weekly Sales](/for-agents/data-model/weekly-sales), [Seasonality](/for-agents/data-model/seasonality), [Strategy](/for-agents/data-model/strategy), and [SOP](/for-agents/data-model/sop). For pushing external data in, see the [Ingest API](/for-agents/ingest).

## The view registry model

* Every queryable surface is a **view** registered in the platform's view catalog: a slug, a display label, a source table (or dataset), and a **registered column list** (`column_name` + display `data_type`).
* Views can be **physical-table backed** (rows in a real table) or **dataset backed** (rows in a generic JSONB store, projected to the registered columns). Query semantics are identical for both.
* **Table-level visibility** follows department mapping and is **default-closed**: a view with no department mapping is visible to nobody except tenant admins; otherwise it must be mapped (enabled) to one of your departments. Admins see all views.
* **Queryability** requires the source table to be tenant-scoped (both `tenant_id` and `workspace_id` columns). Admin meta/audit views are listed for admins with `queryable:false` and cannot be queried over MCP.
* **Row-level visibility:** on a view whose source table has a `scope` column, you only receive the rows scoped to you — tenant-wide rows, rows of your departments, your own user-scoped rows, and your provider's rows. Admins see every row, so a member's counts can legitimately be lower than an admin's. Views without a `scope` column are unfiltered at row level.
* **Registry fixed filters:** a view may carry admin-defined fixed filters (e.g. a "strategy knowledge" view that only shows one category). These are enforced on every read and cannot be bypassed.
* **Soft archive:** views whose source has an `archived_at` column hide archived rows by default; pass `include_archived:true` to see them.
* **Per-agent ceilings:** when an agent (rather than a user key) queries a view, its admin-set view preferences act as a ceiling — pinned columns are the only requestable columns, default filters are always ANDed in, and a row cap limits every call. These preferences are configured via `agent_create.data_sources` / `agent_update.view_prefs` (see [Agents](/for-agents/agents)).

<Note>
  **Column catalog:** the concrete set of views and their columns is **per tenant** and lives in the registry, not in code. Discover it at runtime with `data_view_list` — that response is always the authoritative column table for your tenant. The [Appendix: view & column catalog](#appendix-view--column-catalog) at the end of this page is a snapshot of the **global template** views (the defaults every tenant inherits); a tenant may add its own views or hide columns on top of these.
</Note>

### Data types

The `data_type` shown per column is a **display type**: `text | number | currency | datetime | date | boolean | status | link | email | image | json | markdown`. Free-text `search` matches columns of type `text`, `email`, `link` and `markdown` (identifier-like columns such as `id`, `*_id`, `*_by` are excluded automatically).

***

## `data_view_list`

List the data tables (views) this user may query — slugs, labels, columns and a queryable flag. Call before `data_query`.

**Parameters:** none.

**Returns:**

```json theme={null}
{
  "views": [
    {
      "slug": "customers",
      "label": "Customers",
      "group_label": "CRM",
      "view_type": "table",
      "columns": ["name (text)", "email (email)", "created_at (datetime)", "..."],
      "queryable": true,
      "tenant_scoped": true
    }
  ],
  "count": 12,
  "hint": "Query a queryable:true view with query_data {view_slug, ...}"
}
```

Non-queryable entries carry a `reason`.

**Permissions:** read tool; per-view department visibility applies (default-closed for members, all views for admins).

**Example:**

```json theme={null}
{ "method": "tools/call", "params": { "name": "data_view_list", "arguments": {} } }
```

***

## `data_query`

Query one data view by slug: exact-match filters, free-text search, count-only totals, sort, limit and column projection. This is the **typed path for every exact/aggregate/numeric question** — counts, prices, inventory, filtered records. For conceptual recall use `knowledge_search` / `memory_search` instead.

**Parameters:**

| Name               | Type      | Required | Description                                                                                                      |
| ------------------ | --------- | -------- | ---------------------------------------------------------------------------------------------------------------- |
| `view_slug`        | string    | yes      | Slug from `data_view_list`                                                                                       |
| `filters`          | object    | no       | `{column: value}` equality filters; values must be string, number, boolean or null. Composes with `search` (AND) |
| `search`           | string    | no       | Free-text term over the view's text columns                                                                      |
| `count_only`       | boolean   | no       | Return only `{count}`                                                                                            |
| `limit`            | number    | no       | Max rows (default 25, max 200)                                                                                   |
| `sort_by`          | string    | no       | Column to sort by (must be a registered column)                                                                  |
| `sort_desc`        | boolean   | no       | Default `true`                                                                                                   |
| `include_archived` | boolean   | no       | Include soft-archived rows (default false)                                                                       |
| `select_fields`    | string\[] | no       | Return only these columns (projection) — e.g. skip a heavy transcript column                                     |
| `exclude_fields`   | string\[] | no       | Return all columns except these (applied after `select_fields`)                                                  |

**Returns:** `{rows, count, truncated}` — `truncated:true` means the result hit the limit and more rows may exist. `count_only` returns `{count}`. If a requested `search` could not be applied (no searchable columns), `search_applied:false` is included. Unknown filter/sort/projection columns return a clear error listing the valid columns.

**Row visibility:** scoped rows are filtered to your identity as described above; your totals can differ from an admin's.

**Example:**

```json theme={null}
{
  "method": "tools/call",
  "params": {
    "name": "data_query",
    "arguments": {
      "view_slug": "orders",
      "filters": { "status": "open" },
      "search": "blue strap",
      "select_fields": ["order_no", "customer_name", "total"],
      "sort_by": "created_at",
      "limit": 50
    }
  }
}
```

**Permissions:** read tool; view must be visible and queryable for this user.

***

## Row writes

Row writes target **registered, tenant-scoped catalog tables** (entries of `view_type:"table"` in `data_view_list`). Each writable table is gated by its own grant — see [Row Write Tools](/for-agents/write-tools) for the full list of insert\_/update\_ tools. Common rules:

* `tenant_id` and `workspace_id` are set automatically from your credential — never pass them.
* Only the table's **registered creatable columns** are accepted; identity/ownership columns (`id`, `tenant_id`, `workspace_id`, …) are stripped or protected.
* If the table has an owner column (`submitted_by_user_id` / `owner_user_id` / `user_id`), it is stamped with the calling user, so user-scoped rows really belong to you.
* Each table needs a **per-table write grant** on the key/agent: `insert_<table>` or `update_<table>` (toggled in Settings → MCP Access → Write access per table; granted automatically on OAuth first connect). Without the grant the call is rejected.
* All three tools support `dry_run:true`.

### `data_row_save`

Upsert **one** row keyed on `external_id` — the write counterpart of `data_query`. A second save with the same `external_id` updates the existing row instead of creating a duplicate. Use for ingestion watchers (videos, leads, orders).

| Name         | Type    | Required | Description                                                         |
| ------------ | ------- | -------- | ------------------------------------------------------------------- |
| `table_slug` | string  | yes      | Table slug from `data_view_list`                                    |
| `record`     | object  | yes      | Column=value pairs. **Must include `external_id`** (the upsert key) |
| `dry_run`    | boolean | no       | Validate + preview without writing                                  |

**Returns:** the saved row / upsert receipt (dry-run: the would-be upsert).

**Permissions:** write; requires `insert_<table>` or `update_<table>` grant.

```json theme={null}
{ "method": "tools/call", "params": { "name": "data_row_save", "arguments": {
  "table_slug": "youtube_videos",
  "record": { "external_id": "dQw4w9WgXcQ", "title": "Launch video", "views": 12043 }
} } }
```

### `data_row_create`

Insert a new row (no `external_id` required — the database assigns the row id and any auto-generated columns such as sequence numbers).

| Name         | Type    | Required | Description                        |
| ------------ | ------- | -------- | ---------------------------------- |
| `table_slug` | string  | yes      | Table slug from `data_view_list`   |
| `record`     | object  | yes      | Column=value pairs for the new row |
| `dry_run`    | boolean | no       | Validate + preview without writing |

**Returns:** the created row (including its new `id`).

**Permissions:** write; requires `insert_<table>` grant.

### `data_row_update`

Update one row by `id`. Filters on both tenant **and** workspace — a row id from a different workspace returns "not found". `external_id` can never be set or changed here (use `data_row_save` for upserts).

| Name         | Type    | Required | Description                                                                           |
| ------------ | ------- | -------- | ------------------------------------------------------------------------------------- |
| `table_slug` | string  | yes      | Table slug from `data_view_list`                                                      |
| `id`         | string  | yes      | Row uuid (from `data_query` or a create response)                                     |
| `set`        | object  | yes      | Columns to update, e.g. `{"status": "approved"}`. Protected columns cannot be changed |
| `dry_run`    | boolean | no       | Validate + preview without writing                                                    |

**Returns:** the updated row.

**Permissions:** write; requires `update_<table>` grant.

***

## View management

### `data_view_create`

Create a new data view in the registry with columns and department visibility. The source table must already exist and be tenant-accessible.

| Name                    | Type      | Required | Description                                                                            |
| ----------------------- | --------- | -------- | -------------------------------------------------------------------------------------- |
| `table_name`            | string    | yes      | Existing tenant-accessible source table                                                |
| `view_name`             | string    | yes      | Display name (max 80 chars)                                                            |
| `columns`               | array     | yes      | `[{column_key, label?, order, visible}]` — `column_key` must exist in the target table |
| `department_visibility` | string\[] | no       | Department slugs; empty = all departments                                              |

**Returns:** the created view (id + slug).

**Permissions:** write; **Company-Admin only**.

### `data_view_update`

Update an existing view: rename, replace columns, or set department visibility.

| Name                    | Type      | Required | Description                                        |
| ----------------------- | --------- | -------- | -------------------------------------------------- |
| `view_id`               | string    | yes      | UUID of the existing view                          |
| `view_name`             | string    | no       | Rename                                             |
| `columns`               | array     | no       | Replacement column set (same item shape as create) |
| `department_visibility` | string\[] | no       | Department slugs; empty = all departments          |

**Returns:** the updated view.

**Permissions:** write; **Company-Admin only**.

***

## Appendix: view & column catalog

Snapshot of the **global template** views (`cockpit.views` where `tenant_id IS NULL`) and their columns, generated from the live registry on 2026-08-13. These are the defaults every tenant inherits. Your tenant's live set may differ — `data_view_list` is always authoritative.

Legend: **Vis** = shown by default · **Filt** = filterable · **Search** = full-text searchable · **Edit** = updatable via `data_row_update`/`data_row_save` · **Create** = settable on `data_row_create`. A DB-view source (`v_*`) is read-only regardless of flags.

### `agents` — public.agents

**Capabilities:** read · **Columns:** 9

| Column         | Type     | Vis | Filt | Search | Edit | Create | Section |
| -------------- | -------- | :-: | :--: | :----: | :--: | :----: | ------- |
| `id`           | text     |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `agent_name`   | text     |  ✓  |   ✓  |    ✓   |   ·  |    ·   |         |
| `display_name` | text     |  ✓  |   ✓  |    ✓   |   ·  |    ·   |         |
| `department`   | text     |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `phase`        | text     |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `is_active`    | boolean  |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `role`         | text     |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `model`        | text     |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `created_at`   | datetime |  ✓  |   ·  |    ·   |   ·  |    ·   |         |

### `agent_runs` — public.agent\_runs

**Capabilities:** read (read-only) · **Columns:** 17

| Column             | Type     | Vis | Filt | Search | Edit | Create | Section |
| ------------------ | -------- | :-: | :--: | :----: | :--: | :----: | ------- |
| `agent_name`       | text     |  ✓  |   ✓  |    ✓   |   ·  |    ·   |         |
| `status`           | status   |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `level`            | text     |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `department`       | text     |  ✓  |   ✓  |    ✓   |   ·  |    ·   |         |
| `project`          | text     |  ·  |   ✓  |    ✓   |   ·  |    ·   |         |
| `trigger_type`     | text     |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `triggered_by`     | text     |  ·  |   ✓  |    ✓   |   ·  |    ·   |         |
| `started_at`       | datetime |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `finished_at`      | datetime |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `duration_sec`     | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `summary`          | text     |  ✓  |   ·  |    ✓   |   ·  |    ·   |         |
| `error_msg`        | text     |  ·  |   ✓  |    ✓   |   ·  |    ·   |         |
| `failure_mode`     | text     |  ·  |   ✓  |    ✓   |   ·  |    ·   |         |
| `self_healed`      | boolean  |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `self_heal_action` | text     |  ·  |   ✓  |    ✓   |   ·  |    ·   |         |
| `next_agents`      | json     |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `id`               | text     |  ·  |   ·  |    ✓   |   ·  |    ·   |         |

### `agent_inbox` — public.inbox\_agents

**Capabilities:** read (read-only) · **Columns:** 9

| Column          | Type     | Vis | Filt | Search | Edit | Create | Section |
| --------------- | -------- | :-: | :--: | :----: | :--: | :----: | ------- |
| `created_at`    | datetime |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `id`            | text     |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `subject`       | text     |  ✓  |   ·  |    ✓   |   ·  |    ·   |         |
| `from_agent`    | text     |  ✓  |   ✓  |    ✓   |   ·  |    ·   |         |
| `to_agent`      | text     |  ✓  |   ✓  |    ✓   |   ·  |    ·   |         |
| `activity_type` | status   |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `body`          | markdown |  ✓  |   ·  |    ✓   |   ·  |    ·   |         |
| `tags`          | json     |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `run_id`        | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |

### `decision_log` — public.decision\_log

**Capabilities:** read (read-only) · **Columns:** 13

| Column             | Type     | Vis | Filt | Search | Edit | Create | Section |
| ------------------ | -------- | :-: | :--: | :----: | :--: | :----: | ------- |
| `created_at`       | datetime |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `agent_name`       | text     |  ✓  |   ✓  |    ✓   |   ·  |    ·   |         |
| `project`          | text     |  ·  |   ✓  |    ✓   |   ·  |    ·   |         |
| `decision_type`    | text     |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `autonomous`       | status   |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `self_healed`      | status   |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `output_action`    | text     |  ✓  |   ✓  |    ✓   |   ·  |    ·   |         |
| `decision_reason`  | text     |  ·  |   ·  |    ✓   |   ·  |    ·   |         |
| `escalated_to`     | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `self_heal_action` | text     |  ·  |   ·  |    ✓   |   ·  |    ·   |         |
| `run_id`           | text     |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `input_snapshot`   | json     |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `id`               | text     |  ·  |   ·  |    ·   |   ·  |    ·   |         |

### `decisions` — public.decisions

**Capabilities:** read + catalog + ingest · **Columns:** 61

| Column                        | Type     | Vis | Filt | Search | Edit | Create | Section        |
| ----------------------------- | -------- | :-: | :--: | :----: | :--: | :----: | -------------- |
| `id`                          | text     |  ·  |   ·  |    ·   |   ·  |    ·   |                |
| `decision_no`                 | text     |  ✓  |   ✓  |    ✓   |   ✓  |    ·   | header         |
| `title`                       | text     |  ✓  |   ✓  |    ✓   |   ✓  |    ✓   | header         |
| `role_label`                  | text     |  ·  |   ✓  |    ✓   |   ✓  |    ✓   | header         |
| `submitted_by_user_id`        | text     |  ·  |   ·  |    ·   |   ✓  |    ✓   | header         |
| `interview_mode`              | status   |  ✓  |   ✓  |    ·   |   ✓  |    ✓   | header         |
| `topic_type`                  | status   |  ✓  |   ✓  |    ·   |   ✓  |    ✓   | topic          |
| `process_area`                | text     |  ✓  |   ✓  |    ✓   |   ✓  |    ✓   | topic          |
| `affected_departments`        | text     |  ·  |   ✓  |    ✓   |   ✓  |    ✓   | topic          |
| `current_situation`           | text     |  ·  |   ·  |    ✓   |   ✓  |    ✓   | situation      |
| `problem_or_bottleneck`       | text     |  ·  |   ·  |    ✓   |   ✓  |    ✓   | situation      |
| `waiting_for`                 | status   |  ✓  |   ✓  |    ·   |   ✓  |    ✓   | situation      |
| `blocked_work_count`          | number   |  ·  |   ✓  |    ·   |   ✓  |    ✓   | situation      |
| `waiting_since`               | datetime |  ·  |   ✓  |    ·   |   ✓  |    ✓   | situation      |
| `decision_needed_by`          | datetime |  ✓  |   ✓  |    ·   |   ✓  |    ✓   | situation      |
| `employee_assumption`         | text     |  ·  |   ·  |    ✓   |   ✓  |    ✓   | assumption     |
| `reason_for_assumption`       | text     |  ·  |   ·  |    ✓   |   ✓  |    ✓   | assumption     |
| `risk_if_wrong`               | text     |  ·  |   ·  |    ✓   |   ✓  |    ✓   | assumption     |
| `confidence`                  | status   |  ·  |   ✓  |    ·   |   ✓  |    ✓   | assumption     |
| `reversible_decision`         | boolean  |  ·  |   ✓  |    ·   |   ✓  |    ✓   | assumption     |
| `could_become_permanent_rule` | boolean  |  ·  |   ✓  |    ·   |   ✓  |    ✓   | assumption     |
| `proposed_decision_level`     | status   |  ✓  |   ✓  |    ·   |   ✓  |    ✓   | classification |
| `financial_impact`            | number   |  ·  |   ✓  |    ·   |   ✓  |    ✓   | classification |
| `financial_currency`          | text     |  ·  |   ✓  |    ·   |   ✓  |    ✓   | classification |
| `risk_level`                  | status   |  ✓  |   ✓  |    ·   |   ✓  |    ✓   | classification |
| `impact_level`                | status   |  ✓  |   ✓  |    ·   |   ✓  |    ✓   | classification |
| `decision_owner_role`         | text     |  ·  |   ✓  |    ✓   |   ✓  |    ✓   | classification |
| `pattern_key`                 | text     |  ·  |   ✓  |    ✓   |   ✓  |    ✓   | pattern        |
| `similar_case_count`          | number   |  ·  |   ✓  |    ·   |   ✓  |    ✓   | pattern        |
| `pattern_summary`             | text     |  ·  |   ·  |    ✓   |   ✓  |    ✓   | pattern        |
| `recommended_permanent_rule`  | text     |  ·  |   ·  |    ✓   |   ✓  |    ✓   | pattern        |
| `decision_response`           | status   |  ✓  |   ✓  |    ·   |   ✓  |    ·   | response       |
| `decision_modification`       | text     |  ·  |   ·  |    ✓   |   ✓  |    ·   | response       |
| `decision_reason`             | text     |  ·  |   ·  |    ✓   |   ✓  |    ·   | response       |
| `answered_by_role`            | text     |  ·  |   ✓  |    ✓   |   ✓  |    ·   | response       |
| `answered_by_type`            | status   |  ·  |   ✓  |    ·   |   ✓  |    ·   | response       |
| `answered_at`                 | datetime |  ·  |   ✓  |    ·   |   ✓  |    ·   | response       |
| `final_decision`              | text     |  ·  |   ·  |    ✓   |   ✓  |    ·   | rule           |
| `final_decision_level`        | status   |  ·  |   ✓  |    ·   |   ✓  |    ·   | rule           |
| `conditions`                  | text     |  ·  |   ·  |    ✓   |   ✓  |    ·   | rule           |
| `escalation_conditions`       | text     |  ·  |   ·  |    ✓   |   ✓  |    ·   | rule           |
| `financial_limit`             | number   |  ·  |   ✓  |    ·   |   ✓  |    ·   | rule           |
| `risk_limit`                  | status   |  ·  |   ✓  |    ·   |   ✓  |    ·   | rule           |
| `effective_from`              | date     |  ·  |   ✓  |    ·   |   ✓  |    ·   | rule           |
| `review_date`                 | date     |  ·  |   ✓  |    ·   |   ✓  |    ·   | rule           |
| `rule_version`                | text     |  ·  |   ✓  |    ✓   |   ✓  |    ·   | rule           |
| `related_sop`                 | text     |  ·  |   ✓  |    ✓   |   ✓  |    ✓   | documents      |
| `related_skill`               | text     |  ·  |   ✓  |    ✓   |   ✓  |    ✓   | documents      |
| `related_strategy`            | text     |  ·  |   ✓  |    ✓   |   ✓  |    ✓   | documents      |
| `document_change_required`    | text     |  ·  |   ·  |    ✓   |   ✓  |    ✓   | documents      |
| `published_document`          | text     |  ·  |   ·  |    ✓   |   ✓  |    ·   | documents      |
| `published_version`           | text     |  ·  |   ✓  |    ✓   |   ✓  |    ·   | documents      |
| `published_at`                | datetime |  ·  |   ✓  |    ·   |   ✓  |    ·   | documents      |
| `published_by_role`           | text     |  ·  |   ✓  |    ✓   |   ✓  |    ·   | documents      |
| `scope`                       | text     |  ✓  |   ✓  |    ·   |   ✓  |    ✓   | visibility     |
| `department_id`               | text     |  ·  |   ✓  |    ·   |   ✓  |    ✓   | visibility     |
| `status`                      | status   |  ✓  |   ✓  |    ·   |   ✓  |    ✓   | workflow       |
| `priority`                    | status   |  ✓  |   ✓  |    ·   |   ✓  |    ✓   | workflow       |
| `notification_required`       | boolean  |  ·  |   ✓  |    ·   |   ✓  |    ✓   | workflow       |
| `notification_reason`         | text     |  ·  |   ·  |    ✓   |   ✓  |    ✓   | workflow       |
| `closed_at`                   | datetime |  ·  |   ✓  |    ·   |   ✓  |    ✓   | workflow       |

### `knowledge` — cockpit.knowledge\_base

**Capabilities:** read + history · **Columns:** 21

| Column            | Type     | Vis | Filt | Search | Edit | Create | Section |
| ----------------- | -------- | :-: | :--: | :----: | :--: | :----: | ------- |
| `created_at`      | datetime |  ✓  |   ✓  |    ·   |   ·  |    ·   | meta    |
| `title`           | text     |  ✓  |   ✓  |    ✓   |   ·  |    ·   | header  |
| `scope`           | text     |  ✓  |   ✓  |    ·   |   ·  |    ·   | header  |
| `category_id`     | text     |  ✓  |   ✓  |    ·   |   ✓  |    ✓   | header  |
| `department_id`   | text     |  ✓  |   ✓  |    ·   |   ✓  |    ✓   | header  |
| `importance`      | number   |  ✓  |   ✓  |    ·   |   ·  |    ·   | header  |
| `tags`            | json     |  ✓  |   ·  |    ·   |   ·  |    ·   | meta    |
| `archived_at`     | datetime |  ·  |   ✓  |    ·   |   ·  |    ✓   | meta    |
| `digest_key`      | text     |  ·  |   ✓  |    ·   |   ·  |    ✓   | meta    |
| `content`         | text     |  ✓  |   ·  |    ✓   |   ·  |    ·   | body    |
| `used_by`         | text     |  ✓  |   ·  |    ·   |   ·  |    ·   | meta    |
| `success_count`   | number   |  ✓  |   ·  |    ·   |   ·  |    ·   | meta    |
| `created_by`      | text     |  ✓  |   ·  |    ✓   |   ·  |    ·   | meta    |
| `updated_at`      | datetime |  ✓  |   ·  |    ·   |   ·  |    ·   | meta    |
| `intro`           | text     |  ✓  |   ·  |    ✓   |   ·  |    ·   | meta    |
| `version`         | number   |  ✓  |   ·  |    ·   |   ·  |    ·   | meta    |
| `used_count`      | number   |  ✓  |   ·  |    ·   |   ·  |    ·   | meta    |
| `last_used_at`    | datetime |  ✓  |   ·  |    ·   |   ·  |    ·   | meta    |
| `created_by_user` | text     |  ✓  |   ·  |    ·   |   ·  |    ·   | meta    |
| `id`              | text     |  ·  |   ·  |    ·   |   ·  |    ·   | hidden  |
| `intro_embedding` | text     |  ·  |   ·  |    ·   |   ·  |    ·   | hidden  |

### `knowledge_strategy` — cockpit.knowledge\_base

**Capabilities:** filtered (category=strategy) + history · **Columns:** 21

Same column set and flags as `knowledge` above — the view adds a fixed filter `category=strategy` that is enforced on every read.

### `knowledge_sop` — cockpit.knowledge\_base

**Capabilities:** filtered (category=sop) + history · **Columns:** 21

Same column set and flags as `knowledge` above — the view adds a fixed filter `category=sop` that is enforced on every read.

### `memories` — cockpit.memories

**Capabilities:** read + history · **Columns:** 25

| Column                  | Type     | Vis | Filt | Search | Edit | Create | Section |
| ----------------------- | -------- | :-: | :--: | :----: | :--: | :----: | ------- |
| `created_at`            | datetime |  ✓  |   ✓  |    ·   |   ·  |    ·   | meta    |
| `title`                 | text     |  ✓  |   ✓  |    ✓   |   ·  |    ·   | header  |
| `scope`                 | text     |  ✓  |   ✓  |    ·   |   ·  |    ·   | header  |
| `category_id`           | text     |  ✓  |   ·  |    ·   |   ✓  |    ✓   | header  |
| `importance`            | number   |  ✓  |   ✓  |    ·   |   ·  |    ·   | header  |
| `tags`                  | json     |  ✓  |   ·  |    ·   |   ·  |    ·   | meta    |
| `digested_at`           | datetime |  ✓  |   ✓  |    ·   |   ·  |    ✓   | meta    |
| `promoted_knowledge_id` | boolean  |  ✓  |   ·  |    ·   |   ·  |    ✓   | meta    |
| `archived_at`           | datetime |  ·  |   ✓  |    ·   |   ·  |    ✓   | meta    |
| `department_id`         | text     |  ✓  |   ·  |    ·   |   ·  |    ·   | header  |
| `intro`                 | text     |  ✓  |   ·  |    ✓   |   ·  |    ·   | meta    |
| `department`            | text     |  ✓  |   ·  |    ✓   |   ·  |    ·   | hidden  |
| `user_id`               | text     |  ·  |   ·  |    ·   |   ·  |    ·   | hidden  |
| `agent_id`              | text     |  ·  |   ·  |    ·   |   ·  |    ·   | hidden  |
| `body_markdown`         | text     |  ✓  |   ·  |    ✓   |   ·  |    ·   | body    |
| `body_index`            | text     |  ✓  |   ·  |    ·   |   ·  |    ·   | hidden  |
| `source`                | text     |  ✓  |   ·  |    ✓   |   ·  |    ·   | meta    |
| `confidence`            | number   |  ✓  |   ·  |    ·   |   ·  |    ·   | meta    |
| `needs_review`          | status   |  ✓  |   ·  |    ·   |   ·  |    ·   | meta    |
| `version`               | number   |  ✓  |   ·  |    ·   |   ·  |    ·   | meta    |
| `used_count`            | number   |  ✓  |   ·  |    ·   |   ·  |    ·   | meta    |
| `last_used_at`          | datetime |  ✓  |   ·  |    ·   |   ·  |    ·   | meta    |
| `updated_at`            | datetime |  ✓  |   ·  |    ·   |   ·  |    ·   | meta    |
| `id`                    | text     |  ·  |   ·  |    ·   |   ·  |    ·   | hidden  |
| `intro_embedding`       | text     |  ·  |   ·  |    ·   |   ·  |    ·   | hidden  |

### `skills` — cockpit.skills

**Capabilities:** read + history · **Columns:** 19

| Column                 | Type     | Vis | Filt | Search | Edit | Create | Section |
| ---------------------- | -------- | :-: | :--: | :----: | :--: | :----: | ------- |
| `name`                 | text     |  ✓  |   ✓  |    ✓   |   ·  |    ·   | header  |
| `description`          | text     |  ✓  |   ·  |    ✓   |   ·  |    ·   | body    |
| `scope`                | status   |  ✓  |   ✓  |    ·   |   ·  |    ·   | header  |
| `category_id`          | text     |  ✓  |   ✓  |    ·   |   ✓  |    ✓   | header  |
| `department_id`        | text     |  ✓  |   ✓  |    ·   |   ✓  |    ✓   | header  |
| `tags`                 | json     |  ✓  |   ·  |    ·   |   ·  |    ·   | meta    |
| `load_mode_default`    | text     |  ·  |   ✓  |    ·   |   ·  |    ·   | config  |
| `requires_credentials` | status   |  ✓  |   ✓  |    ·   |   ·  |    ·   | config  |
| `default_tools`        | json     |  ·  |   ·  |    ·   |   ·  |    ·   | config  |
| `tools_required`       | json     |  ·  |   ·  |    ·   |   ·  |    ·   | config  |
| `prompt_block`         | text     |  ·  |   ·  |    ✓   |   ·  |    ·   | body    |
| `docs_markdown`        | text     |  ·  |   ·  |    ✓   |   ✓  |    ·   | body    |
| `body`                 | json     |  ·  |   ·  |    ·   |   ·  |    ·   | body    |
| `slug`                 | text     |  ·  |   ✓  |    ✓   |   ·  |    ·   | hidden  |
| `skill_type`           | status   |  ·  |   ✓  |    ·   |   ·  |    ·   | header  |
| `is_system_skill`      | status   |  ·  |   ✓  |    ·   |   ·  |    ·   | hidden  |
| `created_at`           | datetime |  ·  |   ✓  |    ·   |   ·  |    ·   | meta    |
| `updated_at`           | datetime |  ·  |   ✓  |    ·   |   ·  |    ·   | meta    |
| `id`                   | text     |  ·  |   ·  |    ·   |   ·  |    ·   | hidden  |

### `meeting_notes` — public.meeting\_notes

**Capabilities:** read + ingest · **Columns:** 9

| Column         | Type     | Vis | Filt | Search | Edit | Create | Section |
| -------------- | -------- | :-: | :--: | :----: | :--: | :----: | ------- |
| `id`           | text     |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `title`        | text     |  ✓  |   ✓  |    ✓   |   ·  |    ✓   |         |
| `meeting_date` | datetime |  ✓  |   ✓  |    ·   |   ·  |    ✓   |         |
| `attendees`    | text     |  ✓  |   ✓  |    ✓   |   ·  |    ✓   |         |
| `summary`      | text     |  ✓  |   ✓  |    ✓   |   ·  |    ✓   |         |
| `transcript`   | text     |  ·  |   ·  |    ✓   |   ·  |    ✓   |         |
| `action_items` | text     |  ✓  |   ✓  |    ✓   |   ·  |    ✓   |         |
| `source`       | text     |  ·  |   ✓  |    ·   |   ·  |    ✓   |         |
| `duration_min` | number   |  ·  |   ✓  |    ·   |   ·  |    ✓   |         |

### `orders` — public.orders

**Capabilities:** read + catalog + history · **Columns:** 51

| Column                     | Type     | Vis | Filt | Search | Edit | Create | Section |
| -------------------------- | -------- | :-: | :--: | :----: | :--: | :----: | ------- |
| `id`                       | text     |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `external_id`              | text     |  ✓  |   ✓  |    ✓   |   ·  |    ·   |         |
| `status`                   | status   |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `total`                    | currency |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `currency`                 | text     |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `customer_external_id`     | text     |  ✓  |   ✓  |    ✓   |   ·  |    ·   |         |
| `placed_at`                | datetime |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `created_at`               | datetime |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `order_name`               | text     |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `financial_status`         | text     |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `fulfillment_status`       | text     |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `customer_email`           | text     |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `shipping_name`            | text     |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `shop_source`              | text     |  ·  |   ✓  |    ✓   |   ·  |    ·   |         |
| `shipping_city`            | text     |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `shipping_country`         | text     |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `tags`                     | json     |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `billing_address1`         | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `billing_address2`         | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `billing_city`             | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `billing_company`          | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `billing_country`          | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `billing_country_code`     | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `billing_first_name`       | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `billing_last_name`        | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `billing_matches_shipping` | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `billing_name`             | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `billing_phone`            | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `billing_province`         | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `billing_province_code`    | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `billing_zip`              | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `confirmation_number`      | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `confirmed`                | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `fully_paid`               | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `legacy_resource_id`       | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `metadata`                 | json     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `note`                     | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `po_number`                | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `shipping_address1`        | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `shipping_address2`        | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `shipping_carrier`         | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `shipping_company`         | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `shipping_country_code`    | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `shipping_first_name`      | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `shipping_last_name`       | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `shipping_phone`           | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `shipping_province`        | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `shipping_province_code`   | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `shipping_zip`             | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `status_page_url`          | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `updated_at`               | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |

### `order_line_items` — public.order\_line\_items

**Capabilities:** read + catalog + history · **Columns:** 21

| Column                        | Type     | Vis | Filt | Search | Edit | Create | Section |
| ----------------------------- | -------- | :-: | :--: | :----: | :--: | :----: | ------- |
| `id`                          | text     |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `product_name`                | text     |  ✓  |   ✓  |    ✓   |   ·  |    ·   |         |
| `quantity`                    | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `final_unit_price`            | currency |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `order_external_id`           | link     |  ✓  |   ✓  |    ✓   |   ·  |    ·   |         |
| `sku`                         | text     |  ✓  |   ✓  |    ✓   |   ·  |    ·   |         |
| `barcode`                     | text     |  ✓  |   ✓  |    ✓   |   ·  |    ·   |         |
| `external_id`                 | text     |  ·  |   ·  |    ✓   |   ·  |    ·   |         |
| `title`                       | text     |  ·  |   ·  |    ✓   |   ·  |    ·   |         |
| `name`                        | text     |  ·  |   ·  |    ✓   |   ·  |    ·   |         |
| `currency`                    | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `original_unit_price`         | currency |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `discounted_unit_price`       | currency |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `price`                       | currency |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `product_external_id`         | text     |  ·  |   ✓  |    ✓   |   ·  |    ·   |         |
| `product_legacy_id`           | text     |  ·  |   ✓  |    ✓   |   ·  |    ·   |         |
| `product_total_inventory`     | number   |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `product_tracks_inventory`    | boolean  |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `shop_source`                 | text     |  ·  |   ✓  |    ✓   |   ·  |    ·   |         |
| `created_at`                  | datetime |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `product_variant_external_id` | text     |  ·  |   ✓  |    ✓   |   ·  |    ·   |         |

### `customers` — public.customers

**Capabilities:** read + catalog + history · **Columns:** 15

| Column               | Type     | Vis | Filt | Search | Edit | Create | Section |
| -------------------- | -------- | :-: | :--: | :----: | :--: | :----: | ------- |
| `id`                 | text     |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `external_id`        | text     |  ✓  |   ✓  |    ✓   |   ·  |    ·   |         |
| `name`               | text     |  ✓  |   ✓  |    ✓   |   ·  |    ·   |         |
| `email`              | email    |  ✓  |   ✓  |    ✓   |   ·  |    ·   |         |
| `phone`              | text     |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `status`             | status   |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `last_activity_at`   | datetime |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `first_seen_at`      | datetime |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `first_name`         | text     |  ✓  |   ✓  |    ✓   |   ·  |    ·   |         |
| `last_name`          | text     |  ✓  |   ✓  |    ✓   |   ·  |    ·   |         |
| `billing_first_name` | text     |  ·  |   ✓  |    ✓   |   ·  |    ·   |         |
| `billing_last_name`  | text     |  ·  |   ✓  |    ✓   |   ·  |    ·   |         |
| `billing_phone`      | text     |  ·  |   ·  |    ✓   |   ·  |    ·   |         |
| `shop_source`        | text     |  ·  |   ✓  |    ✓   |   ·  |    ·   |         |
| `legacy_resource_id` | text     |  ·  |   ✓  |    ✓   |   ·  |    ·   |         |

### `products` — public.products

**Capabilities:** read + catalog + history · **Columns:** 29

| Column                     | Type     | Vis | Filt | Search | Edit | Create | Section |
| -------------------------- | -------- | :-: | :--: | :----: | :--: | :----: | ------- |
| `id`                       | text     |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `sku`                      | text     |  ✓  |   ✓  |    ✓   |   ·  |    ·   |         |
| `name`                     | text     |  ✓  |   ✓  |    ✓   |   ·  |    ·   |         |
| `product_family_label`     | text     |  ✓  |   ✓  |    ✓   |   ·  |    ·   |         |
| `price`                    | currency |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `currency`                 | text     |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `stock`                    | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `active`                   | boolean  |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `procurement_trackable`    | boolean  |  ✓  |   ✓  |    ·   |   ✓  |    ✓   |         |
| `lifecycle_status`         | status   |  ·  |   ✓  |    ·   |   ✓  |    ✓   |         |
| `supplier_id`              | text     |  ·  |   ✓  |    ·   |   ✓  |    ✓   |         |
| `supplier_sku`             | text     |  ✓  |   ·  |    ✓   |   ✓  |    ✓   |         |
| `purchase_price`           | currency |  ·  |   ·  |    ·   |   ✓  |    ✓   |         |
| `purchase_currency`        | text     |  ·  |   ✓  |    ·   |   ✓  |    ✓   |         |
| `minimum_order_quantity`   | number   |  ·  |   ·  |    ·   |   ✓  |    ✓   |         |
| `order_multiple`           | number   |  ·  |   ·  |    ·   |   ✓  |    ✓   |         |
| `lead_time_days`           | number   |  ✓  |   ·  |    ·   |   ✓  |    ✓   |         |
| `lead_time_buffer_days`    | number   |  ·  |   ·  |    ·   |   ✓  |    ✓   |         |
| `safety_stock_days`        | number   |  ✓  |   ·  |    ·   |   ✓  |    ✓   |         |
| `target_stock_days`        | number   |  ·  |   ·  |    ·   |   ✓  |    ✓   |         |
| `seasonality_profile`      | status   |  ·  |   ✓  |    ·   |   ✓  |    ✓   |         |
| `is_advertised`            | boolean  |  ·  |   ✓  |    ·   |   ✓  |    ✓   |         |
| `manual_demand_multiplier` | number   |  ·  |   ·  |    ·   |   ✓  |    ✓   |         |
| `manual_target_quantity`   | number   |  ·  |   ·  |    ·   |   ✓  |    ✓   |         |
| `procurement_paused_until` | date     |  ·  |   ·  |    ·   |   ✓  |    ✓   |         |
| `procurement_note`         | text     |  ·  |   ·  |    ✓   |   ✓  |    ✓   |         |
| `inventory_synced_at`      | datetime |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `external_id`              | text     |  ·  |   ✓  |    ✓   |   ·  |    ·   |         |
| `product_family`           | text     |  ·  |   ✓  |    ✓   |   ✓  |    ✓   |         |

### `suppliers` — public.suppliers

**Capabilities:** read + catalog + ingest · **Columns:** 9

| Column                          | Type     | Vis | Filt | Search | Edit | Create | Section |
| ------------------------------- | -------- | :-: | :--: | :----: | :--: | :----: | ------- |
| `name`                          | text     |  ✓  |   ·  |    ✓   |   ✓  |    ✓   |         |
| `external_id`                   | text     |  ✓  |   ·  |    ✓   |   ✓  |    ✓   |         |
| `currency`                      | text     |  ✓  |   ✓  |    ·   |   ✓  |    ✓   |         |
| `default_lead_time_days`        | number   |  ✓  |   ·  |    ·   |   ✓  |    ✓   |         |
| `default_lead_time_buffer_days` | number   |  ✓  |   ·  |    ·   |   ✓  |    ✓   |         |
| `default_target_stock_days`     | number   |  ✓  |   ·  |    ·   |   ✓  |    ✓   |         |
| `comment`                       | text     |  ·  |   ·  |    ✓   |   ✓  |    ✓   |         |
| `id`                            | text     |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `created_at`                    | datetime |  ·  |   ·  |    ·   |   ·  |    ·   |         |

### `purchase_order_lines` — public.purchase\_order\_lines

**Capabilities:** read + catalog + ingest · **Columns:** 19

| Column                  | Type     | Vis | Filt | Search | Edit | Create | Section |
| ----------------------- | -------- | :-: | :--: | :----: | :--: | :----: | ------- |
| `order_no`              | text     |  ✓  |   ✓  |    ✓   |   ✓  |    ✓   |         |
| `sku`                   | text     |  ✓  |   ✓  |    ✓   |   ✓  |    ✓   |         |
| `status`                | text     |  ✓  |   ✓  |    ·   |   ✓  |    ✓   |         |
| `quantity_ordered`      | number   |  ✓  |   ·  |    ·   |   ✓  |    ✓   |         |
| `quantity_received`     | number   |  ✓  |   ·  |    ·   |   ✓  |    ✓   |         |
| `expected_arrival_date` | date     |  ✓  |   ·  |    ·   |   ✓  |    ✓   |         |
| `supplier_id`           | text     |  ·  |   ✓  |    ·   |   ✓  |    ✓   |         |
| `price_per_unit`        | number   |  ✓  |   ·  |    ·   |   ✓  |    ✓   |         |
| `currency`              | text     |  ✓  |   ✓  |    ·   |   ✓  |    ✓   |         |
| `recommendation_key`    | text     |  ·  |   ✓  |    ✓   |   ·  |    ·   |         |
| `note`                  | text     |  ·  |   ·  |    ✓   |   ✓  |    ✓   |         |
| `external_id`           | text     |  ·  |   ✓  |    ✓   |   ✓  |    ✓   |         |
| `id`                    | text     |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `created_at`            | datetime |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `product_name`          | text     |  ✓  |   ✓  |    ✓   |   ·  |    ·   |         |
| `variant_external_id`   | text     |  ·  |   ✓  |    ✓   |   ·  |    ·   |         |
| `product_external_id`   | text     |  ·  |   ✓  |    ✓   |   ·  |    ·   |         |
| `product_id`            | text     |  ·  |   ✓  |    ·   |   ✓  |    ✓   |         |
| `supplier_name`         | text     |  ✓  |   ✓  |    ✓   |   ·  |    ·   |         |

### `procurement_config` — public.procurement\_config

**Capabilities:** read + catalog · **Columns:** 5

| Column        | Type     | Vis | Filt | Search | Edit | Create | Section |
| ------------- | -------- | :-: | :--: | :----: | :--: | :----: | ------- |
| `id`          | text     |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `key`         | text     |  ✓  |   ✓  |    ✓   |   ✓  |    ✓   |         |
| `value`       | json     |  ✓  |   ·  |    ·   |   ✓  |    ✓   |         |
| `updated_at`  | datetime |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `description` | text     |  ✓  |   ·  |    ✓   |   ·  |    ·   |         |

### `v_product_demand` — public.v\_product\_demand

**Capabilities:** read + catalog (DB view, read-only) · **Columns:** 37

| Column                        | Type     | Vis | Filt | Search | Edit | Create | Section |
| ----------------------------- | -------- | :-: | :--: | :----: | :--: | :----: | ------- |
| `sku`                         | text     |  ✓  |   ✓  |    ✓   |   ·  |    ·   |         |
| `product_name`                | text     |  ✓  |   ·  |    ✓   |   ·  |    ·   |         |
| `forecast_daily_demand`       | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `demand_status`               | text     |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `demand_confidence`           | text     |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `units_sold_30d`              | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `units_sold_90d`              | number   |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `units_sold_180d`             | number   |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `weighted_daily_demand`       | number   |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `seasonality_profile`         | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `lifecycle_status`            | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `sales_history_days`          | number   |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `calculated_at`               | datetime |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `product_family_label`        | text     |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `trend_label`                 | status   |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `momentum_pct`                | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `units_sold_28d`              | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `units_sold_14d`              | number   |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `units_sold_365d`             | number   |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `trend_confidence`            | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `daily_sales_28d`             | number   |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `daily_sales_30d`             | number   |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `daily_sales_90d`             | number   |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `daily_sales_180d`            | number   |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `deseasonalized_daily_demand` | number   |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `seasonal_multiplier`         | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `seasonal_source`             | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `coverage_window_start`       | date     |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `coverage_window_end`         | date     |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `coverage_window_factor`      | number   |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `lifecycle_multiplier`        | number   |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `manual_demand_multiplier`    | number   |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `manual_target_quantity`      | number   |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `inventory_synced_at`         | datetime |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `stock_on_hand`               | number   |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `days_of_stock`               | number   |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `product_id`                  | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |

### `v_procurement_agent_queue` — public.v\_procurement\_agent\_queue

**Capabilities:** read + catalog (DB view, read-only) · **Columns:** 51

| Column                            | Type     | Vis | Filt | Search | Edit | Create | Section |
| --------------------------------- | -------- | :-: | :--: | :----: | :--: | :----: | ------- |
| `sku`                             | text     |  ✓  |   ✓  |    ✓   |   ·  |    ·   |         |
| `product_name`                    | text     |  ✓  |   ·  |    ✓   |   ·  |    ·   |         |
| `procurement_status`              | text     |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `action_required`                 | boolean  |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `quantity_available`              | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `days_of_stock`                   | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `recommended_order_quantity`      | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `stock_gap_days`                  | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `forecast_daily_demand`           | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `replenishment_risk_days`         | number   |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `open_purchase_order_quantity`    | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `next_expected_arrival_date`      | date     |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `days_to_latest_order`            | number   |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `quantity_committed`              | number   |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `include_in_next_shipment`        | boolean  |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `supplier_name`                   | text     |  ·  |   ✓  |    ✓   |   ·  |    ·   |         |
| `raw_recommended_order_quantity`  | number   |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `lifecycle_status`                | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `latest_order_date`               | date     |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `calculated_at`                   | datetime |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `demand_status`                   | text     |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `weighted_daily_demand`           | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `demand_confidence`               | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `stock_on_hand`                   | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `projected_stockout_date`         | date     |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `days_until_next_arrival`         | number   |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `days_of_stock_including_open_po` | number   |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `latest_expected_arrival_date`    | date     |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `draft_purchase_order_quantity`   | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `active_purchase_order_count`     | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `lead_time_days`                  | number   |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `lead_time_buffer_days`           | number   |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `safety_stock_days`               | number   |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `target_stock_days`               | number   |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `minimum_order_quantity`          | number   |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `order_multiple`                  | number   |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `procurement_paused_until`        | date     |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `inventory_synced_at`             | datetime |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `product_family`                  | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `product_family_label`            | text     |  ✓  |   ✓  |    ✓   |   ·  |    ·   |         |
| `trend_label`                     | status   |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `momentum_pct`                    | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `units_sold_28d`                  | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `units_sold_30d`                  | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `units_sold_90d`                  | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `units_sold_180d`                 | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `trend_confidence`                | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `seasonal_multiplier`             | number   |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `coverage_window_factor`          | number   |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `product_id`                      | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `supplier_id`                     | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |

### `v_customer_reorder_due` — public.v\_customer\_reorder\_due

**Capabilities:** read + catalog (DB view, read-only) · **Columns:** 15

| Column                  | Type     | Vis | Filt | Search | Edit | Create | Section |
| ----------------------- | -------- | :-: | :--: | :----: | :--: | :----: | ------- |
| `needs_action`          | boolean  |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `customer_email`        | email    |  ✓  |   ✓  |    ✓   |   ·  |    ·   |         |
| `reorder_status`        | status   |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `overdue_days`          | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `orders_so_far`         | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `next_purchase_no`      | number   |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `last_order_date`       | date     |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `due_from`              | date     |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `median_gap_days`       | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `gap_observations`      | number   |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `days_since_last_order` | number   |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `outreach_status`       | status   |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `outreach_at`           | datetime |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `outreach_note`         | text     |  ✓  |   ·  |    ✓   |   ·  |    ·   |         |
| `outreach_channel`      | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |

### `v_family_trend` — public.v\_family\_trend

**Capabilities:** read + catalog (DB view, read-only) · **Columns:** 11

| Column                        | Type     | Vis | Filt | Search | Edit | Create | Section |
| ----------------------------- | -------- | :-: | :--: | :----: | :--: | :----: | ------- |
| `product_family_label`        | text     |  ✓  |   ✓  |    ✓   |   ·  |    ·   |         |
| `trend_label`                 | status   |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `momentum_pct`                | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `units_28d`                   | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `units_90d`                   | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `units_365d`                  | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `sku_count`                   | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `trend_confidence`            | text     |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `forecast_daily_demand`       | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `deseasonalized_daily_demand` | number   |  ·  |   ·  |    ·   |   ·  |    ·   |         |
| `calculated_at`               | datetime |  ·  |   ·  |    ·   |   ·  |    ·   |         |

### `v_product_sales_weekly` — public.v\_product\_sales\_weekly

**Capabilities:** read + catalog (DB view, read-only) · **Columns:** 7

| Column                 | Type   | Vis | Filt | Search | Edit | Create | Section |
| ---------------------- | ------ | :-: | :--: | :----: | :--: | :----: | ------- |
| `week_start`           | date   |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `sku`                  | text   |  ✓  |   ✓  |    ✓   |   ·  |    ·   |         |
| `product_name`         | text   |  ✓  |   ·  |    ✓   |   ·  |    ·   |         |
| `product_family_label` | text   |  ✓  |   ✓  |    ✓   |   ·  |    ·   |         |
| `units`                | number |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `orders`               | number |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `variant_id`           | text   |  ✓  |   ✓  |    ✓   |   ·  |    ·   |         |

### `v_seasonality_effective` — public.v\_seasonality\_effective

**Capabilities:** read + catalog (DB view, read-only) · **Columns:** 11

| Column                | Type     | Vis | Filt | Search | Edit | Create | Section |
| --------------------- | -------- | :-: | :--: | :----: | :--: | :----: | ------- |
| `month`               | number   |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `profile`             | text     |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `products_on_profile` | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `measured_raw`        | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `measured_applied`    | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `override_factor`     | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `factor`              | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `factor_source`       | status   |  ✓  |   ✓  |    ·   |   ·  |    ·   |         |
| `sample_size`         | number   |  ✓  |   ·  |    ·   |   ·  |    ·   |         |
| `confidence`          | text     |  ·  |   ✓  |    ·   |   ·  |    ·   |         |
| `calculated_at`       | datetime |  ·  |   ·  |    ·   |   ·  |    ·   |         |
