Merge End-Users
merge_end_usersConsolidate duplicate end-user records by folding source profiles into a target, re-pointing all linked data and tombstoning sources. Reversible for 30 days; use get_device_candidates to pick IDs first.
Instructions
Merge source end-users into a target and return the merge result, including the merge event id (also recoverable later via list_identity_merges): all FK rows (events, insights, tasks, …) are re-pointed onto the target and the sources are tombstoned. A write; reversible for 30 days via unmerge_end_users. Get the candidate ids from get_device_candidates first — never guess which users to fold together. target_end_user_id and source_end_user_ids are required.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | No | Why the merge (optional, recorded). | |
| target_end_user_id | Yes | UUID of the end-user to keep, from get_device_candidates. | |
| source_end_user_ids | Yes | UUIDs of end-users to fold into the target, from get_device_candidates. |