Merges & bulk cleanup
Autotask’s REST API has no merge, can’t delete companies, and won’t move a contact to another company. So duplicates are merged with Autotask’s own UI merge, and junk is inactivated at a pace the tenant can take.
Safe merges
Section titled “Safe merges”Merges are addressed only by numeric IDs — never by names or searches — and one kind per plan.
autotask_merge_discoverfinds candidates (by email across all three email fields, by exact name, around given IDs), with who created them and when. It never picks a survivor.autotask_merge_dependency_inventorylists everything that points at each record — tickets, contracts, invoices, child companies — and the blockers (e.g. active contracts need a billing review).autotask_merge_build_planturns old → correct IDs (or a CSV) into numbered UI steps with deep links: merge, then delete in Admin. Chains, repeats, company 0 and placeholder survivors are refused.- After the UI work,
autotask_merge_verifyre-reads everything and marks each step done — or says what is still attached.
Bulk cleanup
Section titled “Bulk cleanup”For junk at scale — tens of thousands of placeholder companies an integration created, or junk contacts on one
real account — autotask_bulk_inactivate and the console’s Bulk jobs page run a job:
- Prepare (reads only, from the mirror). For placeholder companies, every company with history — tickets, projects, contracts, opportunities, quotes, invoices, billing items, child companies — or a contact with a real name is excluded. For junk contacts on one company, contacts on the company’s own domains, the primary contact and contacts with history are kept.
- Email safeguard (placeholder cleanups). Real people use personal mail too, so every address is checked across the whole tenant: a ticket on any contact with that address keeps it; a person can list addresses to keep or to treat as junk; an address that also belongs to a contact on a real company is shown as a duplicate. The job card’s Email addresses table shows each decision and why.
- Approve by hash — exactly the records shown — then start: a 50-record canary runs and the job pauses for you to check them in Autotask.
- Resume. The worker writes at the job’s pace: slower in business hours, nothing in quiet hours (another integration’s busy window), half pace from 40% tenant usage, waiting from 65%. Throttling never counts as a failure; 20 real failures in a row pause the job. It continues after a restart.
Inactivated records stay in Autotask. Finished jobs can be archived on the console.
Full details: docs/MERGE.md.