Enterprise Cowork Catalog
Extends cowork from the clinical floor to the whole org: demand/sales/support/success/G&A coworkers, in-platform commercial spine.
Read with
emr-cowork-substrate.mdbefore any sales / marketing / funnel / customer-support / CRM AI-coworker work. This doc extends the substrate from the clinical floor to the whole enterprise. It adds NO new substrate — same agent identity (cowork_agents), same delegation bridge (cowork_proposals+agent_proposalacks), same recommender-first invariants, same data planes. It adds a catalog and one decision (the commercial data spine).
Thesis
A hospital group (BDMS-scale: 49+ hospitals, corporate/insurer/employer contracts, international-patient sales, wellness packages, a call center, CRM/loyalty) is also a commercial enterprise. The cowork substrate scales to all of it. The clinical coworkers are the hardest (PHI, liability); the commercial ones are mostly Growth plane (consent-gated, non-PHI) and in safety terms easier — with two sharp exceptions called out below.
The one genuinely new thing: medOS-ultra is an HIS. It has patients, encounters, billing,
messaging (email/SMS/Socket.IO) — but it has no leads, deals, campaigns, tickets, or contacts model,
and no CRM / helpdesk / marketing-automation system. So commercial coworkers need a data spine
(§5 — the decision).
1. The commercial lifecycle (the “funnel”)
The Growth-plane analog of the clinical encounter_journey. Each stage has coworker(s); the plane shifts
the moment a person becomes an identified patient.
Awareness → Lead → MQL → SQL → Opportunity → Customer/Patient → Onboarded → Retained/Expanded → Advocate
└─────────────── Growth plane (consent-gated, non-PHI) ───────────────┘ └── Operational + consent (PHI) ──┘
A “customer” for a hospital group = patient and payer / employer / corporate partner / referring clinic.
2. The catalog
Same substrate; each coworker is born into a plane (enforced at the DB-grant level). rides on = existing
medOS infra reused; needs = net-new (a connector or the data spine).
Demand / Marketing — Growth plane
| Team | Coworker | Rides on | Needs |
|---|---|---|---|
| Content / SEO | Content drafts (blog/SEO, bilingual TH+EN) | LLM platform | CMS connector |
| Campaigns | Segment brief + analytics | LLM + marketing_consents (Q5) |
marketing_audience view (P5) |
| Paid / Ads | Ad copy + budget-pacing analysis | LLM | ads-platform connector |
| Lifecycle / Email | Nurture-sequence drafts | messaging service (email/SMS) |
channel consent |
| PR / Comms | Press drafts + reputation monitoring | LLM | media-list + news feeds |
| Social / Reputation | Post drafts + review-response drafts | messaging |
social + review connectors |
Sales — Growth plane (B2B)
| Team | Coworker | Rides on | Needs |
|---|---|---|---|
| Lead qual (SDR) | Inbound triage + enrichment + routing | delegation mesh + auto-assign | CRM connector / leads table |
| Account exec (AE) | Quote / proposal / follow-up drafts | LLM | CRM + quote templates |
| Sales ops | Forecast + pipeline analytics | clinical-query/cohort-query skills (generalized) | CRM + BI |
| Deal desk | Pricing/contract drafts (corporate / insurer / employer) | policy_gates (approval) |
contract data |
| Partnerships / BD | Referral-partner outreach | overlaps the clinical referral-liaison coworker | partner data |
Customer Support — Operational + consent (patient) / Growth (prospect)
| Team | Coworker | Rides on | Needs |
|---|---|---|---|
| Tier-1 deflection | KB answer + draft reply | LLM + RAG corpora | helpdesk connector / tickets table |
| Ticket triage | Classify / route / prioritize | delegation mesh + auto-assign | helpdesk |
| Contact center | Call summary + after-call work | messaging + STT (shipped) |
telephony connector |
| Complaint handling | Draft response (regulated — recommender-only, never auto-send) | acknowledgement + policy_gates |
— |
Success / Retention — Operational + consent / Growth
| Team | Coworker | Rides on | Needs |
|---|---|---|---|
| Onboarding | Welcome / itinerary drafts | journey cache | — |
| Retention / churn-risk | Churn signals + re-engagement drafts | engagement signals | consent + connector |
| NPS / CSAT | Survey analysis (aggregate) | clinical-query skill (generalized) | survey data |
| Re-engagement / recall | Appointment-recall / no-show outreach | messaging |
PHI + consent (Operational, not Growth) |
G&A — Operational plane (staff / corporate data; not patient PHI, still sensitive)
| Team | Coworker | Rides on | Needs |
|---|---|---|---|
| Finance / AR | Collections drafts + revenue-at-risk | NHSO/RCM substrate (clinical AR exists) | AP/AR connector |
| FP&A | Variance + forecast briefs | BI views | — |
| Procurement | Vendor / PO drafts | inventory-orchestrator |
vendor data |
| HR / Recruiting | JD drafts + screening summaries | delegation mesh | ATS connector |
| HR helpdesk | Policy Q&A | LLM + RAG | policy KB |
| IT helpdesk | Ticket deflection | LLM + RAG | ITSM connector |
| Legal / Compliance | Contract review + DSAR (PDPA) handling (recommender-only) | policy_gates + audit |
DSAR workflow |
| Data / BI | NL→query, exec briefings | clinical-query + cohort-query skills already shipped | plane-scoped views |
| Executive | Chief-of-staff: briefings, meeting prep, action tracking | delegation mesh | — |
3. Two sharp boundaries (the things that make hospital-commercial ≠ generic SaaS)
- Support that opens a patient record is Operational + PHI — not Growth. A prospect asking “do you do knee replacements?” is Growth (no PHI). A patient asking “why was I charged X on my AN?” pulls a clinical/ billing record → the support coworker for that task runs in the Operational plane, audited, with the PHI wall intact. Same coworker, plane decided per task/context. The growth-plane marketing coworker never gets that grant.
- Recommender-first on all outbound. AI may draft an external email / reply / post / ad, but a human
approves before send — hard rule for anything patient-facing or regulated (complaints, clinical-
adjacent claims). Outbound also honors channel consent + do-not-contact lists (PDPA / anti-spam).
Sending rides the existing
messagingdispatcher (the same one the acknowledgement system uses).
4. What’s reused vs net-new
- Reused (no change):
cowork_agentsidentity,cowork_proposals+agent_proposalbridge, the AcknowledgementInbox Accept/Edit/Reject surface,llm_audit_logattribution, the data-plane model,marketing_consents(Q5), themessagingservice,policy_gates, auto-assign, and the backend runner (P2) — it is plane-agnostic and drives clinical and commercial coworkers identically. - Net-new: only the commercial data spine (§5) + per-domain connectors.
5. THE DECISION — the commercial data spine
medOS has no CRM/helpdesk/MAP. Commercial coworkers need somewhere to read/write leads, deals, tickets, campaigns, contacts. Three shapes:
| Option | What | Pros | Cons |
|---|---|---|---|
| A. Hybrid spine + connectors (recommended) | Thin owned entities (contact, consent, interaction_log) for plane/audit/consent control; connect external CRM/helpdesk/MAP via MCP connectors for the heavy lifting |
Consent + audit + plane enforcement stay in-platform; don’t rebuild CRM; meet the customer’s stack | Two systems to reconcile |
| B. Build in-platform | New tables (leads, opportunities, tickets, campaigns) → platform is the commercial system of record |
Unified, fully plane-controlled, owned | Reinvents CRM / helpdesk / MAP |
| C. External only (MCP) | Coworkers operate on Salesforce / HubSpot / Zendesk / Intercom via connectors; no commercial data in-platform | Fastest; meets existing stack | Consent + PHI boundary spans systems; weaker plane control |
Recommendation: A. Keep the consent/audit/plane spine in-platform (where the PHI wall and marketing_consents
already live); let connectors do the commercial heavy lifting. It preserves the safety model while avoiding a
CRM rebuild.
DECISION (2026-06-05, owner): Option B — build in-platform system of record. Foundation shipped + applied:
20260605c_commercial_spine.sql(crm_contacts,crm_opportunities,marketing_campaigns,support_tickets,crm_interactions,marketing_consents,marketing_audienceview). Tradeoff accepted: medOS now owns CRM/helpdesk-class surfaces (more to maintain) in exchange for full plane/consent/audit control in one place. External connectors (Option A) can still be added later as supplements — but the system of record is in-platform.
6. How it plugs into the rollout
No change to P0–P2. Commercial coworkers are additional Growth/Operational entries served by the same
P2 runner + P1 bridge. The only sequencing addition: the P5.5 “commercial spine” ✅ shipped + applied
2026-06-05 (20260605c, Option B); the first commercial slice follows (suggested: the Support
tier-1 deflection coworker — high volume, clear recommender-first value, KB-grounded).
7. Open decisions
- §5 commercial data spine — ✅ RESOLVED 2026-06-05: B (build in-platform); foundation shipped + applied (mig
20260605c). - Connector strategy — which external systems first (CRM? helpdesk? which vendors?), and MCP vs REST.
- Outbound-send authority — does any commercial channel ever get ACTOR mode (auto-send), or is human- approve-before-send permanent for external comms? (Default: permanent for patient-facing/regulated.)
8. CRM build status (Decision B — in-platform)
| Layer | Shipped 2026-06-05 (applied + verified live) |
|---|---|
| Spine | crm_contacts · crm_opportunities · marketing_campaigns · support_tickets · crm_interactions · marketing_consents · marketing_audience view (mig 20260605c) |
| Full model | configurable crm_pipelines/crm_pipeline_stages · crm_activities · crm_deal_line_items · crm_segments · crm_contacts.lead_score (mig 20260605d) |
| Analytics | crm_funnel_metrics · crm_pipeline_metrics · crm_support_metrics views |
| Demo data | 10 contacts · 6 deals · 3 campaigns · 4 tickets · 4 activities · 4 consents (mig 20260605e) |
| UI · Pipeline | web/src/containers/crm/CrmPipelineWorkspace.tsx (pure) + …Connected.tsx (Supabase) + sandbox ?target=CrmPipelineWorkspace — Pipeline kanban + Marketing→Sales funnel + stat cards (bilingual) |
| UI · Helpdesk | web/src/containers/crm/SupportHelpdeskInbox.tsx (pure) + Connected + sandbox ?target=SupportHelpdeskInbox — support_tickets inbox with per-ticket data-plane badge (Growth vs Operational·PHI) |
| Runner (P2) | services/llm/src/api/llm/modules/coworkRunner/coworkRunner.controller.mixin.ts — llm.coworkRun reads enabled agents → llm.complete → cowork_proposals + ack. Verifies on backend deploy |
Next CRM modules (not yet built): contact/account 360 view · deal detail + line-item editor · campaign manager · activities calendar/inbox · segment builder · dashboards. Then the coworkers (SDR lead-qual / campaign / support deflection) operate on all of it — gated on P2 (the universal runner).
Created 2026-06-05. Companion to emr-cowork-substrate.md. Same substrate, whole-enterprise reach.