NetSuite → ActiveCampaign sync

  1. ns_auth.php — one-time NetSuite authorization
  2. setup.php — preflight: auth + cache custom-field tag→ID map
  3. fetch AC accounts (cached: 300 / 10,305)
  4. fetch AC contacts (cached: 300 / 115,972)
    ~1,160 calls, resumable — reload if it times out
  5. fetch NetSuite (customers: —, contacts: —)
  6. match.php — build both sync lists
  7. review.php — check the lists, uncheck rows
  8. apply.php?dry=1 — dry run, sends nothing
  9. live write: apply.php?dry=0&confirm=WRITE

selftest.php — verify the matching rules