Skip to main content

Zoho retirement — deletion plan (batch 6 audit)

Do not blanket-delete Zoho. Two systems coexist. Schema tables and /zoho/sync/* HTTP contracts need Brock approval before removal (VISION Out of Scope: schema + external webhook contracts).

Inventory

LIVE (keep until a dedicated sunset)

LEGACY (gate now; delete in phases)

Already removed in batch 6

  • Dead app/api/cron/zoho-sync + Vercel cron entry
  • Dead app/api/zoho/funding-machines stub
  • Funding_Machines cluster helpers from lib/zoho.ts
  • Dashboard MigrationHealthCard widget

Deletion phases (Brock-gated)

  1. Hide — set NEXT_PUBLIC_ZOHO_MIGRATION_UI_ENABLED=false in preview/prod when no locations still need the wizard. UI + migrate/authorize/revoke APIs return 404; workers/schema stay.
  2. Delete LEGACY code — remove wizard pages, migrate/authorize/revoke routes, lib/zoho-migration/, and unused migration workers once no in-flight jobs remain. Keep LIVE import/enrich + overflow mirror.
  3. Schema / webhook sunset — only after LIVE overflow + FM_Credit_Reports paths are replaced or confirmed unused: drop convex/schemas/zoho.ts tables and /zoho/sync/* with an explicit Brock approval citation (schema Out of Scope).

Flag

NEXT_PUBLIC_ZOHO_MIGRATION_UI_ENABLED — default on (unset ≠ false). Redeploy after changing; NEXT_PUBLIC_* is build-time.