← Back to brief

feedback hs reconciliation method

memory · feedback_hs_reconciliation_method.md

Canonical SoT ↔ HubSpot reconciliation method: parse lead_source_notes for ID:R###### tokens (supports multiple tokens per contact for shared-email pairs). Do NOT rely on trackingsource.

Why: trackingsource was historically set to lead_id but is effectively write-only in the HS v3 API — filter queries work, but reads return empty. We learned this the hard way during a full 772/772 reconciliation. lead_source_notes is a reliable, human-readable, multi-value field.

How to apply: When reconciling SoT against HubSpot, or when a skill needs to find the HS contact for a given lead_id, regex lead_source_notes with matchAll(/ID:R\d+/g) to capture all associated IDs (shared-email contacts hold 2+ IDs). When updating a contact that already has lead_source_notes, APPEND new tokens rather than overwriting — preserves dual-ID format for shared emails.