Tenant data model (DataPool)

Canonical DataPool schemas for a generic B2B value chain. Other model skills read and write these tables. This is a playbook for schema names, columns, and stop rules — not a prompt.

Document information
FieldValue
Canonical URL/docs/07_ai-agents-and-mcp/model_skills/00_shared/tenant-data-model
Version (published date)2026-08-26
Tagsai, skills, datapool, playbooks

Kind

Resource / canonical model.

When to use

Install first. Stage playbooks and handovers depend on these schemas. Do not store value-chain records in platform Entities, products, or contracts unless the tenant already made that choice outside this library.

Depends on

None.

Prerequisites

idquestionsearchif_missing_or_ambiguousdefault_to_proposebinds_to
leads_schemaWhich DataPool schema holds marketing leads?Load datapool. describe_datapool_table with schema_name leads (and close aliases).Ask to bind an existing name or create the suggested schema. Confirm before create_datapool_schema.Create schema leads with the suggested columns belowTenant SKILL.md
opportunities_schemaWhich DataPool schema holds sales opportunities?describe_datapool_table opportunitiesSame as leadsCreate opportunitiesTenant SKILL.md
deliveries_schemaWhich DataPool schema holds delivery work?describe_datapool_table deliveriesSameCreate deliveriesTenant SKILL.md
support_cases_schemaWhich DataPool schema holds support cases?describe_datapool_table support_casesSameCreate support_casesTenant SKILL.md
handovers_schemaWhich DataPool schema holds inter-team handovers?describe_datapool_table handoversSameCreate handoversTenant SKILL.md

Import contract

FieldValue
suggested_skill_idtenant-data-model
version1.0.0
capabilities.toolsdescribe_datapool_table, query_datapool, create_datapool_schema, insert_datapool_rows, update_datapool_rows, request_human_input
Paired model agentssales-ready-lead-watcher, won-opportunity-handover-watcher, delivery-blocker-watcher, support-sla-watcher

Suggested DataPool columns

Use these schema_definition objects when creating a missing schema (create_datapool_schema: schema_name + schema_definition). Confirm with request_human_input before create. If the tenant already has equivalent tables, bind names and map columns in the installed playbook — do not invent a second model.

leads

ColumnTypeRequiredMeaning
lead_idstringyesStable id
sourcestringnoCampaign or inbound source
company_namestringyesAccount name as known to marketing
contact_namestringno
contact_emailstringno
statusstringyesnew | qualifying | sales_ready | disqualified
scorenumberno0–100
disqualify_reasonstringnoRequired when status is disqualified
owner_user_idstringnoTenant user id
updated_atstringnoISO-8601 UTC

opportunities

ColumnTypeRequiredMeaning
opportunity_idstringyes
lead_idstringnoOriginating lead
company_namestringyes
stagestringyesdiscovery | proposal | negotiation | won | lost
amountnumberno
currencystringno
next_gatestringnoQuality gate not yet passed
owner_user_idstringno
close_datestringno
lost_reasonstringnoRequired when lost
updated_atstringno

deliveries

ColumnTypeRequiredMeaning
delivery_idstringyes
opportunity_idstringyesWon opportunity
statusstringyeskickoff | in_progress | acceptance | complete
kickoff_completestringnoyes / no
acceptance_completestringnoyes / no
blocker_summarystringnoOpen quality-gate failure
owner_user_idstringno
updated_atstringno

support_cases

ColumnTypeRequiredMeaning
case_idstringyes
delivery_idstringnoOriginating delivery
severitystringyessev1 | sev2 | sev3 | sev4
statusstringyesopen | waiting_customer | waiting_internal | resolved | closed
sla_due_atstringnoISO-8601 UTC
owner_user_idstringno
updated_atstringno

handovers

ColumnTypeRequiredMeaning
handover_idstringyes
kindstringyesmarketing_to_sales | sales_to_delivery | delivery_to_support
from_record_idstringyesSource row id
to_record_idstringnoTarget row id after accept
packet_jsonstringyesDoD field packet as JSON text
statusstringyesproposed | accepted | rejected
notify_recipient_user_idstringyesIn-app inbox user
notify_channelstringyesDefault in_app_notification
notify_statusstringnopending | sent | failed
accepted_atstringno
updated_atstringno

Tenant SKILL.md (copy this body)

After Prerequisite binding, replace tokens.

# Tenant data model (DataPool)

Canonical value-chain records for this tenant live in DataPool. Load `load_platform_skill` with `skill_id: datapool`. Call `describe_datapool_table` before any row write.

Do not use platform Entities, products, or contracts as the system of record for this playbook.

## Bound schemas

| Role | schema_name |
|---|---|
| Leads | {{leads_schema}} |
| Opportunities | {{opportunities_schema}} |
| Deliveries | {{deliveries_schema}} |
| Support cases | {{support_cases_schema}} |
| Handovers | {{handovers_schema}} |

## Sequence

1. `describe_datapool_table` for the bound `schema_name`.
2. Read with `query_datapool`. Filter; do not scan unbounded.
3. Writes: `insert_datapool_rows` / `update_datapool_rows` using **only** columns from describe. Confirm before `delete_datapool_rows` or schema drops.
4. Status values must match the allowed enumerations in this playbook (or the bound tenant’s documented aliases).

## Stop

- Do not invent column names.
- Do not copy CRM-native keys into these rows (use `crm-field-mapping`).
- If describe fails, stop and report the missing schema; do not silently switch to another resource.

Optional skill.json

{
  "name": "tenant-data-model",
  "version": "1.0.0",
  "description": "Canonical DataPool schemas for the B2B value chain (leads through support).",
  "capabilities": {
    "prompt": ["Describe DataPool tables before writes. Bound schema_name values are the system of record."],
    "resources": [],
    "tools": [
      "describe_datapool_table",
      "query_datapool",
      "create_datapool_schema",
      "insert_datapool_rows",
      "update_datapool_rows",
      "request_human_input"
    ]
  }
}

See also