{"slug":"architecture/07_DATA_GOVERNANCE_PRIVACY","title":"IntegrateWise Data Governance & Privacy Guide","section":"architecture","sectionLabel":"Architecture","status":"unclassified","type":"document","path":"architecture/07_DATA_GOVERNANCE_PRIVACY.mdx","bytes":27486,"description":null,"updated":null,"source":"integratewise/Integratewise-docs-wiki","content":"\n## Data Classification, Privacy, and Compliance\n\n**Version:** 1.0  \n**Classification:** Internal + Legal/Compliance  \n**Last Updated:** January 2026\n\n---\n\n# Table of Contents\n\n1. [Data Governance Framework](#1-data-governance-framework)\n2. [Data Classification](#2-data-classification)\n3. [Data Retention](#3-data-retention)\n4. [Data Deletion & Export](#4-data-deletion--export)\n5. [GDPR Compliance](#5-gdpr-compliance)\n6. [CCPA Compliance](#6-ccpa-compliance)\n7. [BYOM Isolation](#7-byom-isolation)\n8. [Data Processing Agreements](#8-data-processing-agreements)\n9. [Privacy by Design](#9-privacy-by-design)\n\n---\n\n# 1. Data Governance Framework\n\n## 1.1 Governance Principles\n\n| Principle          | Description                                 |\n| ------------------ | ------------------------------------------- |\n| **Data Ownership** | Customers own their data; we are custodians |\n| **Minimization**   | Collect only what's necessary               |\n| **Transparency**   | Clear documentation of data practices       |\n| **Security**       | Protect data throughout its lifecycle       |\n| **Compliance**     | Meet all regulatory requirements            |\n| **Accountability** | Clear roles and responsibilities            |\n\n## 1.2 Data Governance Structure\n\n```\n┌─────────────────────────────────────────────────────────────────────────────┐\n│                      DATA GOVERNANCE STRUCTURE                               │\n└─────────────────────────────────────────────────────────────────────────────┘\n\n                         ┌──────────────────┐\n                         │  Data Protection │\n                         │     Officer      │\n                         │    (Founder)     │\n                         └────────┬─────────┘\n                                  │\n              ┌───────────────────┼───────────────────┐\n              │                   │                   │\n              ▼                   ▼                   ▼\n     ┌────────────────┐  ┌────────────────┐  ┌────────────────┐\n     │   Engineering  │  │     Legal      │  │   Operations   │\n     │                │  │                │  │                │\n     │ • Technical    │  │ • Compliance   │  │ • Process      │\n     │   controls     │  │ • DPAs         │  │ • Training     │\n     │ • Security     │  │ • Policies     │  │ • Audits       │\n     └────────────────┘  └────────────────┘  └────────────────┘\n```\n\n## 1.3 Data Lifecycle\n\n```\n┌─────────────────────────────────────────────────────────────────────────────┐\n│                         DATA LIFECYCLE                                       │\n└─────────────────────────────────────────────────────────────────────────────┘\n\n     COLLECT          PROCESS          STORE           SHARE           DELETE\n     ───────          ───────          ─────           ─────           ──────\n\n     ┌─────────┐     ┌─────────┐     ┌─────────┐     ┌─────────┐     ┌─────────┐\n     │ Consent │────▶│ Validate│────▶│ Encrypt │────▶│ Authorize│───▶│ Secure  │\n     │ & Legal │     │ & Clean │     │ & Store │     │ & Log   │     │ Destroy │\n     │ Basis   │     │         │     │         │     │         │     │         │\n     └─────────┘     └─────────┘     └─────────┘     └─────────┘     └─────────┘\n          │               │               │               │               │\n          ▼               ▼               ▼               ▼               ▼\n     • API imports   • Schema       • AES-256       • RBAC          • 30-day\n     • Integrations    validation   • RLS           • Audit logs      window\n     • Manual entry  • Sanitization • Backups       • DPA required  • Backup\n                                                                      purge\n```\n\n---\n\n# 2. Data Classification\n\n## 2.1 Classification Levels\n\n| Level | Label        | Description               | Examples                           |\n| ----- | ------------ | ------------------------- | ---------------------------------- |\n| **1** | Public       | Non-sensitive, shareable  | Marketing content, public docs     |\n| **2** | Internal     | Business operational data | Account names, company info        |\n| **3** | Confidential | Sensitive business data   | Revenue, health scores, strategies |\n| **4** | Restricted   | Highly sensitive          | PII, credentials, keys             |\n\n## 2.2 Data Categories\n\n| Category             | Classification   | Handling                            |\n| -------------------- | ---------------- | ----------------------------------- |\n| **Account data**     | Internal (2)     | Standard encryption                 |\n| **Contact PII**      | Restricted (4)   | Enhanced encryption, access logging |\n| **Financial data**   | Confidential (3) | Encrypted, limited access           |\n| **Health scores**    | Confidential (3) | Encrypted, audit logged             |\n| **User credentials** | Restricted (4)   | Hashed, never logged                |\n| **API keys**         | Restricted (4)   | Hashed, minimal exposure            |\n| **Audit logs**       | Internal (2)     | Immutable, time-limited access      |\n\n## 2.3 Classification by Data Type\n\n```\n┌─────────────────────────────────────────────────────────────────────────────┐\n│                      DATA CLASSIFICATION MAP                                 │\n└─────────────────────────────────────────────────────────────────────────────┘\n\n     RESTRICTED (4)              CONFIDENTIAL (3)           INTERNAL (2)\n     ──────────────              ────────────────           ────────────\n\n     • Email addresses           • MRR/ARR values           • Company names\n     • Phone numbers             • Health scores            • Industry/size\n     • Personal names            • Deal amounts             • Account status\n     • OAuth tokens              • Contract terms           • Activity counts\n     • API keys                  • Churn predictions        • Feature usage\n     • Passwords (hashed)        • Custom fields (PII)      • Integration status\n\n     HANDLING:                   HANDLING:                  HANDLING:\n     • App-level encryption      • Standard encryption      • Standard encryption\n     • Access logging required   • Access logging           • Basic access control\n     • Need-to-know access       • Role-based access        • All authenticated users\n     • Never in logs             • Redacted in logs         • Can appear in logs\n```\n\n## 2.4 Custom Field Classification\n\nCustomers can mark custom fields with sensitivity levels:\n\n| Setting       | Behavior                                            |\n| ------------- | --------------------------------------------------- |\n| **Standard**  | Normal handling, appears in exports                 |\n| **Sensitive** | Redacted in logs, limited API exposure              |\n| **PII**       | Encrypted at rest, strict access, deletion tracking |\n\n---\n\n# 3. Data Retention\n\n## 3.1 Retention Schedule\n\n| Data Type         | Active Retention | Archive | Deletion              |\n| ----------------- | ---------------- | ------- | --------------------- |\n| **Account data**  | Account lifetime | None    | 30 days after closure |\n| **Contact data**  | Account lifetime | None    | 30 days after closure |\n| **Activity logs** | 1 year           | 1 year  | 2 years total         |\n| **Audit logs**    | 2 years          | None    | 2 years               |\n| **Sync history**  | 90 days          | None    | 90 days               |\n| **Backups**       | 30 days          | None    | 30 days rolling       |\n| **Session data**  | 24 hours         | None    | 24 hours              |\n\n## 3.2 Retention Implementation\n\n```sql\n-- Automated retention enforcement\n-- Runs daily via scheduled job\n\n-- Delete old sync history (90 days)\nDELETE FROM sync_history\nWHERE created_at < NOW() - INTERVAL '90 days';\n\n-- Archive old activity logs (1 year active, then archive)\nINSERT INTO activity_logs_archive\nSELECT * FROM activity_logs\nWHERE created_at < NOW() - INTERVAL '1 year'\n  AND created_at >= NOW() - INTERVAL '2 years';\n\nDELETE FROM activity_logs\nWHERE created_at < NOW() - INTERVAL '1 year';\n\n-- Purge archived logs (2 years total)\nDELETE FROM activity_logs_archive\nWHERE created_at < NOW() - INTERVAL '2 years';\n```\n\n## 3.3 Backup Retention\n\n| Backup Type                | Retention | Location       |\n| -------------------------- | --------- | -------------- |\n| **Daily full backup**      | 30 days   | Primary region |\n| **Point-in-time recovery** | 7 days    | Primary region |\n| **Monthly backup**         | 12 months | Cross-region   |\n\n---\n\n# 4. Data Deletion & Export\n\n## 4.1 Data Export\n\n### Export Options\n\n| Format   | Contents             | Availability |\n| -------- | -------------------- | ------------ |\n| **JSON** | All data, structured | All plans    |\n| **CSV**  | Tabular data         | All plans    |\n| **PDF**  | Reports, summaries   | Pro+ plans   |\n\n### Export Process\n\n```\n┌─────────────────────────────────────────────────────────────────────────────┐\n│                         DATA EXPORT FLOW                                     │\n└─────────────────────────────────────────────────────────────────────────────┘\n\n     REQUEST                PROCESS                DELIVER\n     ───────                ───────                ───────\n\n     ┌─────────────┐       ┌─────────────┐       ┌─────────────┐\n     │  User       │──────▶│  Generate   │──────▶│  Notify     │\n     │  requests   │       │  export     │       │  user       │\n     │  export     │       │  (async)    │       │             │\n     └─────────────┘       └─────────────┘       └─────────────┘\n           │                     │                     │\n           ▼                     ▼                     ▼\n     • Settings →           • Gather all         • Email with\n       Export               • accounts           • secure link\n     • Select format        • contacts           • 7-day expiry\n     • Select data          • activities         • Download\n       types                • documents            audit logged\n```\n\n### Export via API\n\n```bash\n# Request export\nPOST /v1/exports\n{\n  \"format\": \"json\",\n  \"include\": [\"accounts\", \"contacts\", \"activities\"]\n}\n\n# Response\n{\n  \"export_id\": \"exp_abc123\",\n  \"status\": \"processing\",\n  \"estimated_completion\": \"2026-01-07T11:00:00Z\"\n}\n\n# Check status\nGET /v1/exports/exp_abc123\n\n# Download when ready\nGET /v1/exports/exp_abc123/download\n```\n\n## 4.2 Data Deletion\n\n### Deletion Types\n\n| Type                 | Scope             | Timeline  |\n| -------------------- | ----------------- | --------- |\n| **Record deletion**  | Single record     | Immediate |\n| **Bulk deletion**    | Selected records  | 24 hours  |\n| **Account closure**  | All org data      | 30 days   |\n| **Right to erasure** | All personal data | 30 days   |\n\n### Deletion Process\n\n```\n┌─────────────────────────────────────────────────────────────────────────────┐\n│                      DATA DELETION PROCESS                                   │\n└─────────────────────────────────────────────────────────────────────────────┘\n\n     REQUEST           VERIFY            EXECUTE           CONFIRM\n     ───────           ──────            ───────           ───────\n\n     Day 0             Day 0             Day 1-30          Day 30\n     ┌─────────┐      ┌─────────┐      ┌─────────┐      ┌─────────┐\n     │ User    │─────▶│ Verify  │─────▶│ Mark    │─────▶│ Purge   │\n     │ request │      │ identity│      │ deleted │      │ from    │\n     │         │      │ & auth  │      │         │      │ backups │\n     └─────────┘      └─────────┘      └─────────┘      └─────────┘\n          │                │                │                │\n          │                │                │                │\n          ▼                ▼                ▼                ▼\n     • Support        • MFA confirm    • Soft delete    • Confirm\n       request or     • Admin auth     • Remove from      complete\n       Settings →     • Log request      active DB      • Email user\n       Account                         • Audit entry    • Update\n       Deletion                                           records\n```\n\n### What Gets Deleted\n\n| Component            | Account Closure       | Right to Erasure        |\n| -------------------- | --------------------- | ----------------------- |\n| **Account records**  | ✅ All                | ✅ All                  |\n| **Contact records**  | ✅ All                | ✅ Requesting user only |\n| **Activity history** | ✅ All                | ✅ Related to user      |\n| **Documents**        | ✅ All                | ✅ Created by user      |\n| **Audit logs**       | ❌ Retained (2 years) | ❌ Retained (legal)     |\n| **Billing records**  | ❌ Retained (legal)   | ❌ Retained (legal)     |\n| **Backups**          | ✅ Purged (30 days)   | ✅ Purged (30 days)     |\n\n---\n\n# 5. GDPR Compliance\n\n## 5.1 GDPR Overview\n\nThe General Data Protection Regulation (GDPR) applies to IntegrateWise when:\n\n- Processing data of EU/EEA residents\n- Customers are EU-based organizations\n- Marketing to EU individuals\n\n## 5.2 GDPR Rights Implementation\n\n| Right                                     | Article    | Implementation                          |\n| ----------------------------------------- | ---------- | --------------------------------------- |\n| **Right to be informed**                  | Art. 13-14 | Privacy policy, data collection notices |\n| **Right of access**                       | Art. 15    | Data export feature                     |\n| **Right to rectification**                | Art. 16    | Edit any record                         |\n| **Right to erasure**                      | Art. 17    | Account deletion, data deletion         |\n| **Right to restrict processing**          | Art. 18    | Contact support                         |\n| **Right to data portability**             | Art. 20    | JSON/CSV export                         |\n| **Right to object**                       | Art. 21    | Marketing opt-out, processing objection |\n| **Rights related to automated decisions** | Art. 22    | Health score explanation, manual review |\n\n## 5.3 Lawful Basis for Processing\n\n| Data Type                  | Lawful Basis        | Justification                |\n| -------------------------- | ------------------- | ---------------------------- |\n| **Account data**           | Contract            | Necessary to provide service |\n| **Contact PII**            | Legitimate interest | Customer success management  |\n| **Usage analytics**        | Legitimate interest | Service improvement          |\n| **Marketing emails**       | Consent             | Opt-in required              |\n| **Support communications** | Contract            | Service delivery             |\n\n## 5.4 GDPR Compliance Checklist\n\n```markdown\n## GDPR Compliance Checklist\n\n### Data Collection\n\n- [x] Privacy policy published and accessible\n- [x] Data collection notices at point of collection\n- [x] Consent mechanism for marketing\n- [x] Cookie consent banner\n\n### Data Subject Rights\n\n- [x] Export feature available (portability)\n- [x] Deletion feature available (erasure)\n- [x] Edit feature available (rectification)\n- [x] Marketing opt-out available (objection)\n\n### Technical Measures\n\n- [x] Encryption at rest and in transit\n- [x] Access controls and audit logging\n- [x] Data minimization in collection\n- [x] Retention policies enforced\n\n### Organizational Measures\n\n- [x] DPA available for customers\n- [x] Sub-processor list published\n- [x] Data breach notification process\n- [x] Staff training on data protection\n```\n\n## 5.5 Data Protection Impact Assessment (DPIA)\n\nRequired for high-risk processing:\n\n| Processing Activity          | DPIA Required | Status       |\n| ---------------------------- | ------------- | ------------ |\n| **Health score calculation** | Yes           | ✅ Completed |\n| **AI-powered suggestions**   | Yes           | ✅ Completed |\n| **Integration data sync**    | Yes           | ✅ Completed |\n| **Basic CRM functions**      | No            | N/A          |\n\n---\n\n# 6. CCPA Compliance\n\n## 6.1 CCPA Overview\n\nThe California Consumer Privacy Act (CCPA) applies when:\n\n- Customers are California-based businesses\n- Processing data of California residents\n- Meeting revenue/data volume thresholds\n\n## 6.2 CCPA Rights Implementation\n\n| Right                           | Implementation                             |\n| ------------------------------- | ------------------------------------------ |\n| **Right to know**               | Privacy policy + data export               |\n| **Right to delete**             | Account/data deletion                      |\n| **Right to opt-out of sale**    | We do not sell data                        |\n| **Right to non-discrimination** | Same service regardless of rights exercise |\n\n## 6.3 CCPA Categories of Personal Information\n\n| Category                     | Collected | Purpose             |\n| ---------------------------- | --------- | ------------------- |\n| **Identifiers**              | Yes       | Service delivery    |\n| **Commercial information**   | Yes       | Service delivery    |\n| **Internet activity**        | Yes       | Service improvement |\n| **Professional information** | Yes       | Service delivery    |\n| **Inferences**               | Yes       | Health scores       |\n\n## 6.4 Do Not Sell Statement\n\n**IntegrateWise does not sell personal information.**\n\nWe do not:\n\n- Sell data to third parties\n- Share data for cross-context advertising\n- Disclose data for monetary consideration\n\n---\n\n# 7. BYOM Isolation\n\n## 7.1 Bring Your Own Model (BYOM)\n\nEnterprise customers can connect their own AI models:\n\n| Connection Type           | Data Handling                             |\n| ------------------------- | ----------------------------------------- |\n| **Customer OpenAI key**   | Data goes to customer's OpenAI account    |\n| **Customer Azure OpenAI** | Data stays in customer's Azure tenant     |\n| **Self-hosted model**     | Data never leaves customer infrastructure |\n\n## 7.2 BYOM Data Isolation\n\n```\n┌─────────────────────────────────────────────────────────────────────────────┐\n│                      BYOM DATA ISOLATION                                     │\n└─────────────────────────────────────────────────────────────────────────────┘\n\n     Standard Mode                    BYOM Mode\n     ─────────────                    ─────────\n\n     ┌─────────────┐                 ┌─────────────┐\n     │ IntegrateWise│                 │ IntegrateWise│\n     │   App       │                 │   App       │\n     └──────┬──────┘                 └──────┬──────┘\n            │                               │\n            │ Prompt                        │ Prompt\n            ▼                               ▼\n     ┌─────────────┐                 ┌─────────────┐\n     │ IntegrateWise│                 │  Customer's │\n     │  AI Account │                 │  AI Account │\n     │  (OpenAI)   │                 │  (OpenAI)   │\n     └─────────────┘                 └─────────────┘\n            │                               │\n            │                               │\n            ▼                               ▼\n     IntegrateWise                   Customer controls:\n     controls:                       • Data retention\n     • Standard policies             • Model selection\n     • Our DPA with OpenAI           • Their DPA with OpenAI\n```\n\n## 7.3 BYOM Configuration\n\n```typescript\n// Customer provides their own API key (encrypted)\n{\n  \"ai_provider\": {\n    \"type\": \"openai\",\n    \"api_key_encrypted\": \"enc_...\",  // Customer's key\n    \"model\": \"gpt-4-turbo\",\n    \"endpoint\": \"https://api.openai.com/v1\"  // Or Azure endpoint\n  }\n}\n\n// Data flow with BYOM\nasync function generateWithBYOM(prompt: string, config: AIConfig) {\n  // Data goes directly to customer's AI provider\n  // IntegrateWise never stores the prompt or response\n  // Audit log records: \"AI request sent to customer BYOM\"\n\n  return await callAI(config.endpoint, config.api_key, prompt);\n}\n```\n\n---\n\n# 8. Data Processing Agreements\n\n## 8.1 DPA Overview\n\nWe provide Data Processing Agreements (DPAs) for:\n\n- Enterprise customers\n- Customers processing EU data\n- Customers requiring contractual data protection\n\n## 8.2 Standard DPA Terms\n\n| Term                         | Our Commitment                              |\n| ---------------------------- | ------------------------------------------- |\n| **Processing scope**         | Only as directed by customer                |\n| **Sub-processors**           | Listed, notification of changes             |\n| **Security measures**        | Technical and organizational controls       |\n| **Data breach notification** | Within 72 hours                             |\n| **Audit rights**             | Annual SOC 2 report or on-site (Enterprise) |\n| **Data return/deletion**     | Within 30 days of termination               |\n| **SCCs**                     | EU Standard Contractual Clauses included    |\n\n## 8.3 DPA Request Process\n\n1. Contact legal@integratewise.com\n2. Receive standard DPA template\n3. Review and sign\n4. Countersigned DPA returned\n\nTurnaround: 5-10 business days\n\n---\n\n# 9. Privacy by Design\n\n## 9.1 Privacy Principles in Development\n\n| Principle               | Implementation                               |\n| ----------------------- | -------------------------------------------- |\n| **Proactive**           | Privacy considered from design phase         |\n| **Default**             | Privacy-protective settings by default       |\n| **Embedded**            | Privacy built into architecture              |\n| **Full functionality**  | No false choice between privacy and features |\n| **End-to-end security** | Security throughout data lifecycle           |\n| **Visibility**          | Transparent practices                        |\n| **User-centric**        | User interests prioritized                   |\n\n## 9.2 Privacy Review Checklist\n\n```markdown\n## Feature Privacy Review\n\n**Feature:** [Name]\n**Date:** [Date]\n**Reviewer:** [Name]\n\n### Data Collection\n\n- [ ] What data is collected?\n- [ ] Is collection minimized to what's necessary?\n- [ ] Is there clear user notice?\n- [ ] What's the lawful basis?\n\n### Data Storage\n\n- [ ] Where is data stored?\n- [ ] How long is it retained?\n- [ ] Is it encrypted?\n- [ ] Who has access?\n\n### Data Sharing\n\n- [ ] Is data shared externally?\n- [ ] Is there a DPA in place?\n- [ ] Can users opt out?\n\n### Data Subject Rights\n\n- [ ] Can users access this data?\n- [ ] Can users delete this data?\n- [ ] Can users export this data?\n\n### Risk Assessment\n\n- [ ] What are the privacy risks?\n- [ ] What mitigations are in place?\n- [ ] Is a DPIA required?\n\n### Approval\n\n- [ ] Privacy review approved\n- [ ] Legal review approved (if required)\n```\n\n## 9.3 Default Privacy Settings\n\n| Setting                            | Default                 | User Can Change |\n| ---------------------------------- | ----------------------- | --------------- |\n| **Marketing emails**               | Off                     | Yes             |\n| **Activity tracking**              | On (required)           | No              |\n| **Public profile**                 | Off                     | Yes             |\n| **Data sharing with integrations** | Per-integration consent | Yes             |\n| **AI features**                    | On                      | Yes             |\n\n---\n\n**IntegrateWise Data Governance & Privacy Guide**  \n_Version 1.0 — January 2026_\n\nFor questions: privacy@integratewise.com\n"}