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-machinesstub Funding_Machinescluster helpers fromlib/zoho.ts- Dashboard
MigrationHealthCardwidget
Deletion phases (Brock-gated)
- Hide — set
NEXT_PUBLIC_ZOHO_MIGRATION_UI_ENABLED=falsein preview/prod when no locations still need the wizard. UI + migrate/authorize/revoke APIs return 404; workers/schema stay. - 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. - Schema / webhook sunset — only after LIVE overflow + FM_Credit_Reports paths are replaced or confirmed unused: drop
convex/schemas/zoho.tstables 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.
