HighLevel migration core

The migration envelope groups existing reviewed CSV import jobs by GoodQA organization and HighLevel location. It maps each object kind and source ID to the committed target, source fingerprint and import job. It uses the existing highlevel_csv importer for planning and committing contacts, companies and opportunities; it does not implement another importer.

Declare the source row counts when creating an envelope. Attach completed jobs from that same organization, location and kind. Reconciliation reports source, imported, skipped, conflicts and pending decisions separately for each declared kind. Missing IDs require a documented decision. Reattaching a job preserves CRM edits and identifies conflicts. Decisions accept the current target snapshot; a later target edit invalidates that acceptance. Cutover requires exact counts and no unresolved decisions, then increments the writer epoch. Later migration writers must call assertWriterEpoch inside their write transaction. Closed envelopes refuse writes.

Cutover changes only GoodQA's envelope and writer epoch. It changes nothing in GHL, does not disable any GHL writer, and makes no request to GHL. Coordinating external writers remains an operational responsibility.

The checked-in synthetic export kit has three locations across two organizations, colliding IDs across object kinds, duplicate emails, missing IDs, and a renamed pipeline stage. It is based on documented API field shapes and adapted to the existing CSV import contract; it is not a claim that Paul's native exports use identical column labels.

Integration requires the exact composition changes in REGISTRATION-PROPOSAL.md. This slice keeps those production files readonly and executes the proposal in a disposable application overlay. The importer snapshot helpers must be exported as proposed before enabling this module. Reconciliation is read-only, including through MCP.

MANUAL-PENDING: Paul supplies the real contact, business and opportunity exports for each location, confirms source ownership and the authoritative source inventory, and identifies who stops or coordinates external writers. Validate real column mapping, relationships, duplicate policy and pipeline/stage rename history against those exports before any customer migration. Later slices add their object kinds and writers to this envelope. No real accounts or customer data were used here.

We use essential cookies to keep you signed in. See our Privacy Policy for details.