Pre-import utility that counts how many candidates already exist in the caller’s other lists under the three-tier cross-list dedupe cascade.
lib/lists/cross-list-dedup.ts:
people — an array of up to 10,000 { linkedinUrl, fullName, company, location } objects.searchId — the server loads all lead_search_results for that search (paginated 1000 at a time, no 10k cap) and dedupes against the caller’s lists. The search must be owned by the caller.excludeListId to exclude a specific list from the dedupe set — typical pattern is excluding the list you’re about to import into.
checkListDuplicates with the candidate set (or searchId).duplicateCount so the user can decide whether to proceed as-is, add dedupe, or cancel.importFromSalesNav or the appropriate CSV import route — that route handles the actual dedupe during import.people mode.searchId — it’s both more efficient and uncapped.people mode: 10,000 entries per call, otherwise 400.searchId mode: unlimited, the server paginates 1000 at a time.fullName and no company/location will only match tier-1 (LinkedIn URL) — i.e. effectively never. Agents should prefer enriching these fields before calling.Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Provide either people (inline array) or searchId (batch fetched server-side). The two paths are mutually exclusive — searchId takes precedence when both are set.
Explicit batch of candidates to check. Capped at 10,000 entries per call. Ignored when searchId is also provided.
10000When provided, the server loads all lead_search_results rows for this search (paginated 1000 at a time) instead of reading people from the body. The search must belong to the caller.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Optional list to skip when building the caller's cross-list dedupe set. Use this to check duplicates against other lists while excluding the list you're about to import into.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Count of candidates that would be suppressed by cross-list dedupe. Returns { duplicateCount: 0 } when people is empty or omitted (and no searchId is given).
Number of candidates in the input that already exist in one of the caller's other lists, under the three-tier cascade (LinkedIn URL → name+company → name+location).
0 <= x <= 9007199254740991