{"slug":"architecture/ENTITY_INVENTORY","title":"IntegrateWise Entity Inventory (31 Core Entities)","section":"architecture","sectionLabel":"Architecture","status":"unclassified","type":"document","path":"architecture/ENTITY_INVENTORY.mdx","bytes":7312,"description":null,"updated":null,"source":"integratewise/Integratewise-docs-wiki","content":"\nThis document is the canonical inventory of the 31 primary entities in the IntegrateWise Spine DB and domain schemas under Architecture v3.0. It defines their purpose, key attributes, relationships, and how they bridge L1 Workspaces and L2 Cognitive Overlays.\n\n---\n\n## 🟢 Core Spine (Unified Schema)\n\nThese entities represent the foundation of the Spine and are used across all departments to maintain standard identity and activity lines.\n\n### 1. `account`\n\n- **Domain**: Customer Success / General\n- **Purpose**: Mapped record of a client organization. Resolves identities across HubSpot, Salesforce, and Stripe.\n- **Core Attributes**: `id` (UUID), `tenant_id`, `name`, `domain`, `arr`, `health_score`.\n- **Relationships**: Has many `contact`s, `deal`s, and `ticket`s.\n\n### 2. `contact`\n\n- **Domain**: Customer Success / Sales\n- **Purpose**: Individual stakeholders linked to accounts. Resolves a Person profile across Gmail, HubSpot, and Slack.\n- **Core Attributes**: `id` (UUID), `tenant_id`, `name`, `email`, `role`, `source_system`.\n- **Relationships**: Belongs to `account`.\n\n### 3. `task`\n\n- **Domain**: General Operations\n- **Purpose**: Any task, to-do, or ticket from Jira, Linear, or Asana.\n- **Core Attributes**: `id` (UUID), `tenant_id`, `title`, `status` (Todo | In_Progress | Done), `priority`.\n- **Relationships**: Optionally links to `account` or `contact`.\n\n### 4. `note`\n\n- **Domain**: General Operations\n- **Purpose**: Rich text documents, Google Docs, or Notion pages mapped to the Spine.\n- **Core Attributes**: `id` (UUID), `title`, `body_md`, `tags`, `source_tool`.\n- **Relationships**: Belongs to `account`, has many `evidence_ref`s.\n\n### 5. `calendar_event`\n\n- **Domain**: General Operations\n- **Purpose**: Calendar meetings retrieved from Google Calendar or Outlook.\n- **Core Attributes**: `id` (UUID), `tenant_id`, `title`, `start_time`, `end_time`, `attendees`.\n- **Relationships**: Links to `contact`s via attendee emails.\n\n### 6. `conversation`\n\n- **Domain**: General Operations\n- **Purpose**: Threads and chat history from Slack or Microsoft Teams.\n- **Core Attributes**: `id` (UUID), `source`, `message_count`, `topic`, `participants`.\n- **Relationships**: Connects to `contact`s via participants.\n\n### 7. `signal`\n\n- **Domain**: Cognitive Layer (L2)\n- **Purpose**: Proactive anomalies or event triggers detected by the Twin from spine changes.\n- **Core Attributes**: `id` (UUID), `tenant_id`, `signal_type`, `severity` (low | warn | critical), `description`.\n- **Relationships**: Belongs to a source entity (e.g. `account` or `deal`).\n\n---\n\n## 🔵 Customer Success (`cs` Schema)\n\nEntities that drive Account Success, QBRs, renewals, and risk mapping.\n\n### 8. `account_master`\n\n- **Purpose**: Consolidated health profile representing the unified customer record.\n- **Relationships**: References `account`.\n\n### 9. `success_plan`\n\n- **Purpose**: Structured milestone plan for achieving client outcomes.\n- **Relationships**: Belongs to `account`.\n\n### 10. `risk_register`\n\n- **Purpose**: Identified renewal risks, churn threats, or product drop-offs.\n- **Relationships**: Belongs to `account`, linked to `signal`s.\n\n### 11. `engagement_log`\n\n- **Purpose**: Historical record of QBRs, calls, and email cadences.\n- **Relationships**: References `account` and `contact`.\n\n### 12. `renewal`\n\n- **Purpose**: Financial projection of upcoming contract renewals.\n- **Relationships**: Belongs to `account`.\n\n### 13. `stakeholder_outcome`\n\n- **Purpose**: Quantifiable ROI expectations of individual buyers.\n- **Relationships**: Belongs to `contact`.\n\n### 14. `initiative`\n\n- **Purpose**: Projects established to drive account value or resolve issues.\n- **Relationships**: Linked to `success_plan`.\n\n### 15. `capability`\n\n- **Purpose**: Product features/modules adopted by the account.\n- **Relationships**: References `account`.\n\n### 16. `value_stream`\n\n- **Purpose**: Mapping of client processes optimization metrics.\n- **Relationships**: Belongs to `account`.\n\n### 17. `api_portfolio`\n\n- **Purpose**: Mapped external system integrations used by the client.\n- **Relationships**: References `account`.\n\n---\n\n## 🟡 Sales & Marketing (`sales` & `marketing` Schemas)\n\n### 18. `deal`\n\n- **Purpose**: Real-time sales opportunities (HubSpot deals / Salesforce opportunities).\n- **Relationships**: Belongs to `account`.\n\n### 19. `lead`\n\n- **Purpose**: Qualified prospects entering the pipeline.\n- **Relationships**: Links to `contact`.\n\n### 20. `campaign`\n\n- **Purpose**: Marketing demand generation initiatives.\n- **Core Attributes**: `id`, `name`, `status`, `cpl`, `mqls`.\n\n### 21. `audience_segment`\n\n- **Purpose**: Targets grouped for campaign execution.\n- **Relationships**: Linked to `campaign`.\n\n---\n\n## 🟣 Support & Engineering (`support` & `eng` Schemas)\n\n### 22. `ticket`\n\n- **Purpose**: Customer support issues (Zendesk / HubSpot Tickets).\n- **Relationships**: Belongs to `account`, links to `employee` (assignee).\n\n### 23. `csat`\n\n- **Purpose**: Satisfaction ratings collected after ticket resolutions.\n- **Relationships**: Belongs to `ticket`.\n\n### 24. `sprint`\n\n- **Purpose**: Engineering development cycles.\n- **Core Attributes**: `sprint_id`, `name`, `start_date`, `end_date`, `status`.\n\n### 25. `incident`\n\n- **Purpose**: System outages, SEV1 alerts, or pipeline failures.\n- **Relationships**: Linked to `sprint` and `service` mappings.\n\n---\n\n## 🔴 Finance & Operations (`finance` & `hr` Schemas)\n\n### 26. `invoice`\n\n- **Purpose**: Customer billing records from Stripe or QuickBooks.\n- **Relationships**: Belongs to `account`.\n\n### 27. `payment`\n\n- **Purpose**: Cleared transactions resolving invoices.\n- **Relationships**: Belongs to `invoice`.\n\n### 28. `employee`\n\n- **Purpose**: Internal workspace users, CSMs, or AEs.\n- **Core Attributes**: `id`, `name`, `role`, `load` (workload %).\n- **Relationships**: Assigned to `account`s and `ticket`s.\n\n---\n\n## ⚙️ Memory & Governance (Flow C)\n\nThese entities represent institutional memory and action proposals.\n\n### 29. `ai_memories`\n\n- **Purpose**: Staged raw memories, session summaries, or learnings processed by the Triage Bot.\n- **Relationships**: Links to source `conversation` or `signal`.\n\n### 30. `consolidated_memories` (Org Memory)\n\n- **Purpose**: Canonized institutional knowledge promoted to the Book of Projects.\n- **Relationships**: Append-only, points to entities via `entity_refs`.\n\n### 31. `action` (Playbook Action)\n\n- **Purpose**: Proposed playbooks or actions needing human-in-the-loop (HITL) approval before execution.\n- **Relationships**: References `signal` and target tools.\n\n---\n\n## 🔗 Cross-Surface Relationships Mapping\n\nThe following diagram illustrates how the three data flows intersect inside the Unified Entity 360 profile:\n\n```mermaid\ngraph TD\n    subgraph Flow A: Truth\n        A1[account] --> A2[deal]\n        A1 --> A3[invoice]\n    end\n\n    subgraph Flow B: Context\n        B1[note] -->|Linked via context_extractions| A1\n        B2[calendar_event] -->|Linked via attendees| A1\n    end\n\n    subgraph Flow C: Memory\n        C1[ai_memories] -->|Approved by User| C2[consolidated_memories]\n        C2 -->|Ref references| A1\n    end\n\n    A1 -->|Hydrates| E360[Unified Entity 360]\n    B1 -->|Hydrates| E360\n    C2 -->|Hydrates| E360\n```\n"}