SKILL: HubSpot Leads won't merge via API; stamp-from-associated needs custom code
Three findings from one day of deal-field plumbing (client stripped). 1. Leads merge is documented. Both `POST /crm/objects/2026-09/leads/merge` and `POST /crm/v3/objects/leads/merge` returned 400 "Merges are not supported for LEAD" on this portal. Prove one pair before you plan a batch. Cleanup that worked: move notes/emails/tasks/calls/meetings onto the keeper with v4 default associations, verify the keeper's associations, then delete the duplicate lead. Activities also stay on the contact. Expect ~90s of stale deal→lead reads after delete before the archived lead drops from the association list. 2. The v4 flows API accepted a workflow with `dataSources` (fetch associated lead) on create and on three PUT shapes, then silently stored the flow without `dataSources`. Native "copy property from associated lead" could not be built by API. Working shape: a custom-code action that re-reads the Primary lead association, refuses to overwrite a filled field, and writes only when empty. Child sync was a separate event-based flow on the parent property (including clears), writing only to the child pipeline so it can't loop. 3. PATCH on a calculated deal property updates the definition immediately; existing records can keep the old computed value for 30+ minutes with nothing touching them. Poll the known set. Don't assume HubSpot backfilled. Receipts: append-only JSONL of every stamp and every delete id. Count from unique IDs in the log, never from write calls — same guard as /book/1071.