{"slug":"business/QUICK_REFERENCE","title":"IntegrateWise Quick Reference Card","section":"business","sectionLabel":"Business","status":"unclassified","type":"document","path":"business/QUICK_REFERENCE.mdx","bytes":9022,"description":null,"updated":null,"source":"integratewise/Integratewise-docs-wiki","content":"\n\n> **Tier C — Historical.** This document is a point-in-time snapshot preserved for reference. For current architecture, see [CANONICAL_PLATFORM_ARCHITECTURE.md](../architecture/CANONICAL_PLATFORM_ARCHITECTURE.md).\n\n## One-Liner\n**Unified operational platform where one role = one automatically-loaded domain workbench, with intelligent metric/action routing.**\n\n---\n\n## Core Hooks\n\n```typescript\n\nconst { \n  projection,        // L1Projection {metrics, widgets, actions}\n  domain,            // \"account-success\" | \"salesops\" | etc\n  defaultView,       // \"health-dashboard\" | \"pipeline\" | etc\n  suggestedConnectors, // [\"salesforce\", \"zendesk\", \"intercom\"]\n  workbench_context  // WorkbenchContext {timeRange, filters, etc}\n} = useL1Projection()\n```\n\n---\n\n## Core Functions\n\n```typescript\n// Get domain for role\nconst {domain, defaultView, connectors} = getRoleDomainMapping(\"cs_manager\")\n\n// Get action route\nconst route = getActionRoute(\"schedule_ebr\")\n// → {domain: \"account-success\", view: \"meetings-view\"}\n\n// Get action navigation URL\nconst url = getActionNavigationUrl(quickAction)\n// → \"/workspace/account-success/meetings-view\"\n```\n\n---\n\n## 16 Roles & Their Domains\n\n| Role | Domain | View |\n|------|--------|------|\n| `sales_rep` | `salesops` | `pipeline` |\n| `sales_manager` | `salesops` | `team-pipeline` |\n| `cs_specialist` | `account-success` | `accounts` |\n| `cs_manager` | `account-success` | `health-dashboard` |\n| `finance_manager` | `revops` | `cash-flow` |\n| `finance_analyst` | `revops` | `collections` |\n| `support_lead` | `account-success` | `tickets` |\n| `support_agent` | `account-success` | `my-queue` |\n| `marketing_manager` | `personal` | `campaigns` |\n| `marketing_analyst` | `personal` | `lead-sources` |\n| `engineering_lead` | `personal` | `projects` |\n| `engineering_manager` | `personal` | `team-velocity` |\n| `ops_manager` | `integratewise-apac` | `operations` |\n| `ops_analyst` | `revops` | `process-health` |\n| `hr_manager` | `personal` | `team` |\n| `ceo` | `integratewise-apac` | `executive` |\n\n---\n\n## 5 Domain Workspaces\n\n```\npersonal              — Individual productivity hub\naccount-success       — CS health & renewals (25+ views)\nrevops                — Revenue operations & forecasting\nsalesops              — Sales execution & pipeline\nintegratewise-apac    — Admin console & full platform control\n```\n\n---\n\n## Quick Action Routes (Sample)\n\n```typescript\n// Sales\n\"create_deal\"      → salesops/pipeline\n\"log_activity\"     → salesops/activities\n\"call_lead\"        → salesops/dialer\n\n// CS\n\"schedule_ebr\"     → account-success/meetings-view\n\"create_expansion\" → account-success/opportunities\n\"send_playbook\"    → account-success/documents-view\n\n// Finance\n\"create_budget\"    → revops/budgeting\n\"send_invoice\"     → revops/invoicing\n\n// 40+ total routes mapped\n```\n\n---\n\n## Widget Data Source Routes (Sample)\n\n```typescript\n// Sales\n\"pipeline_by_stage\"    → salesops/pipeline\n\"rep_metrics\"          → salesops/team-performance\n\"forecast_accuracy\"    → salesops/forecasting\n\n// CS\n\"health_by_segment\"    → account-success/health-dashboard\n\"renewal_calendar\"     → account-success/accounts-view\n\"usage_trends\"         → account-success/account-master-view\n\n// Finance\n\"cash_flow\"            → revops/cash-flow\n\"revenue_breakdown\"    → revops/reporting\n\"overdue_invoices\"     → revops/collections\n\n// 30+ total routes mapped\n```\n\n---\n\n## L1 Projection Structure\n\n```typescript\ninterface L1Projection {\n  workbench: string           // \"sales\" | \"cs\" | \"finance\" | etc\n  user_role: UserRole         // The role that generated this\n  domain: string              // \"salesops\" | \"account-success\" | etc\n  layout: string              // \"dashboard\" | \"table\" | \"kanban\"\n  \n  metrics: MetricProjection[] // 4 KPIs\n  widgets: WidgetProjection[] // 3-4 data visualizations\n  quick_actions: QuickActionProjection[] // 3-4 actions\n  filters: FilterProjection[] // Context-aware filters\n  permissions: string[]       // What this role can do\n}\n```\n\n---\n\n## Role-Based Workbench Example\n\n**As CS Manager:**\n```typescript\n{\n  metrics: [\n    {id: \"nrr\", value: 108, label: \"NRR %\"},\n    {id: \"churn\", value: 3, label: \"Churn %\"},\n    {id: \"health\", value: 87, label: \"Health Score\"},\n    {id: \"at_risk\", value: 3, label: \"At-Risk Accounts\"}\n  ],\n  widgets: [\n    {id: \"health_by_segment\", data_source: \"...\"},\n    {id: \"renewal_calendar\", data_source: \"...\"},\n    {id: \"at_risk_accounts\", data_source: \"...\"},\n    {id: \"usage_trends\", data_source: \"...\"}\n  ],\n  quick_actions: [\n    {id: \"schedule_ebr\", label: \"Schedule EBR\", action: \"schedule_ebr\"},\n    {id: \"create_expansion\", label: \"Expansion Opp\", action: \"create_expansion\"},\n    {id: \"send_playbook\", label: \"Send Playbook\", action: \"send_playbook\"},\n    {id: \"review_health\", label: \"Review Health\", action: \"review_health\"}\n  ]\n}\n```\n\n---\n\n## File Structure\n\n```\napps/web/\n├── lib/\n│   ├── workbench-projections.ts    ← 16 workbench builders + domain mapping\n│   ├── l1-domain-wiring.ts         ← 40+ action routes + 30+ widget routes\n│   ├── l1-l2-context.ts            ← Context + hooks\n│   └── connector-integration.ts    ← Connector bridging\n├── components/\n│   ├── domains/\n│   │   ├── account-success/        ← 25+ views\n│   │   ├── salesops/               ← Sales views\n│   │   ├── revops/                 ← Finance views\n│   │   ├── personal/               ← Personal views\n│   │   └── integratewise-apac/     ← Admin views\n│   ├── workspace-shell.tsx         ← Main container\n│   ├── sidebar.tsx                 ← Domain picker\n│   ├── top-bar.tsx                 ← Header\n│   └── providers/\n│       └── l1-provider.tsx         ← L1 context provider\n```\n\n---\n\n## Navigation Flow\n\n```\nUser logs in with role\n         ↓\nL1Provider calls generateProjectionForRole(role)\n         ↓\nReturns: L1Projection + domain info\n         ↓\nNavigate to /workspace/{domain}/{defaultView}\n         ↓\nDomain shell loads (account-success/shell.tsx, etc)\n         ↓\nRenders L1 metrics, widgets, actions\n         ↓\nUser clicks action\n         ↓\ngetActionRoute(action) returns target domain/view\n         ↓\nNavigate to /workspace/{domain}/{view}\n```\n\n---\n\n## Performance\n\n- Role lookup: **< 1ms**\n- Projection generation: **< 1ms**\n- Action routing: **< 1ms**\n- Navigation: **< 100ms**\n- **Total click-to-view: < 150ms**\n\n---\n\n## Testing Checklist\n\n- [ ] Load as sales_rep → redirects to salesops\n- [ ] Load as cs_manager → redirects to account-success\n- [ ] Load as ceo → redirects to integratewise-apac\n- [ ] Click \"Schedule EBR\" → navigates to meetings-view\n- [ ] Click \"Create Deal\" → navigates to pipeline\n- [ ] All 40+ action routes working\n- [ ] All 30+ widget routes working\n- [ ] Domain change regenerates projection\n- [ ] Suggested connectors populate correctly\n\n---\n\n## Usage Example\n\n```typescript\n// In a component\n  const navigate = useNavigate()\n  \n  const handleClick = () => {\n    const url = getActionNavigationUrl(action)\n    if (url) navigate(url)\n  }\n  \n  return <button onClick={handleClick}>{action.label}</button>\n}\n```\n\n---\n\n## Adding a New Role\n\n1. Add to `UserRole` type:\n```typescript\nexport type UserRole = \"...\" | \"new_role\"\n```\n\n2. Create builder:\n```typescript\nfunction buildNewRoleWorkbench(): L1Projection { ... }\n```\n\n3. Add to generator:\n```typescript\n  switch(role) {\n    case \"new_role\": return buildNewRoleWorkbench()\n    // ...\n  }\n}\n```\n\n4. Add domain mapping:\n```typescript\n  new_role: { \n    domain: \"my-domain\", \n    defaultView: \"my-view\",\n    connectors: [...]\n  },\n  // ...\n}\n```\n\n---\n\n## Adding a New Quick Action Route\n\n1. Add to `actionRouteMap`:\n```typescript\n  my_action: { domain: \"salesops\", view: \"my-view\" },\n  // ...\n}\n```\n\n2. Use in component:\n```typescript\nconst url = getActionNavigationUrl(action)\nnavigate(url)\n```\n\n---\n\n## Documentation\n\n- `COMPLETE_IMPLEMENTATION_SUMMARY.md` — Full architecture\n- `FRONTEND_WIRING_COMPLETE.md` — Detailed wiring\n- `IMPLEMENTATION_VERIFICATION.md` — Verification checklist\n- `QUICK_REFERENCE.md` — This file\n\n---\n\n## Key Insight\n\n**Same unified Spine data. One L1 projection per role. One domain per projection. One default view per domain. Unlimited perspectives.**\n\nEach role sees exactly what they need to do their job. No more, no less.\n"}