Guides
Data operations
Import, export, data cleanup, and merge operations in OpsDash.
Data import
Contact CSV import (Pro)
Location: CRM → Contacts → Import
Required columns: name, email
Optional columns: phone, company, lead_source, industry, company_size, timezone, tags (comma-separated), status
Behavior:
- Existing contacts (matched by email, case-insensitive) are updated (upsert)
- New contacts are created
- Each row is checked against the
crm:contactsusage limit - Import result shows: created, updated, skipped counts with per-row errors
Deal CSV import (Pro)
Location: CRM → Deals → Import Deals
Required columns: title, value, stage
Stage values: lead, qualified, proposal, negotiation, won, lost
Optional: email (links to existing contact), probability (0–100), notes, expected_close_date
Behavior: Insert-only (no upsert). If email matches an existing contact, the deal is linked to that contact.
Data export
Workspace data export (Pro)
Location: CRM → Data Export
Downloads one JSON file (full rows per table) or one multi-section CSV (companies, contacts, leads, deals, projects, tasks). Used for backup, migration, or handoff. Gated by crm:export.
GDPR export (all tiers)
Location: Account → Profile → Export My Data
Exports all data associated with the requesting user's account as a JSON archive. Required by GDPR Article 20 (data portability). Available to every user for their own data.
Data cleanup
Location: CRM → Data Cleanup (Pro only)
Go-live checklist
A list of data quality checks that surface issues before client handoff:
- Contacts with no email address
- Deals with no close date
- Deals with no linked contact
- Open deals with no activity in over 30 days
- Leads with no lead source
Server action: getDataQualityReport(orgSlug) in actions/data-quality.ts
Duplicate detection
Finds potential duplicate contacts and companies by comparing emails and names:
- Exact email match → high confidence duplicate
- Same normalized name + same company → medium confidence
- Results are presented as pairs with a “Merge” action
Merge
Select the primary record (the one to keep) and the duplicate (the one to remove). The merge operation:
- Re-links all related records (deals, activities, tasks) from the duplicate to the primary
- Merges non-conflicting field values into the primary
- Soft-deletes the duplicate (
deleted_atis set) - Writes a
contact.mergedaudit log entry
Server action: mergeContacts(orgSlug, primaryId, duplicateId)
Soft delete behavior
Contacts, deals, leads, tasks, and support tickets are soft-deleted — a deleted_at timestamp is set rather than removing the row. This preserves audit history and prevents orphaned references. All list queries include deleted_at IS NULL filters automatically via RLS or query conditions.
Hard delete is not exposed in the UI. For GDPR deletion requests, use the account deletion flow which purges all user data via the service role client.