{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Preview the result of merging one contact into another without applying the merge. This is a read-only dry run: it reports whether the merge is allowed and, if so, exactly what would change, **without modifying any data**.\n\nSend the same `from` and `into` contact IDs you would pass to [Merge two contacts](/docs/references/rest-api/api.intercom.io/contacts/mergecontact). You can merge a contact with a `role` of `lead` into a contact with a `role` of `user`. You can optionally pass `custom_attribute_names` to include specific custom attributes in the previewed attribute changes.\n\n- When `allowed` is `true`, the response contains a `summary`: every attribute change (with the resulting value on the surviving contact) and, for each object type, two counts — `from`, how many are on the source contact and would move to the destination, and `into`, how many the destination already has. Counts are reported for conversations, tickets, phone calls, notes, and tags. `conversations` counts non-ticket conversations only; tickets are reported separately under `tickets`, and `phone_calls` is present only for phone-channel merges.\n- When `allowed` is `false`, the response contains `reasons`. Each reason has a stable `code` you can branch on and a human-readable `message` you can display.\n\n{% admonition type=\"warning\" name=\"Previewing non-duplicate contacts\" %}\nBy default a merge requires the two contacts to share an identifier (email or phone). Set `skip_duplicate_validation` to `true` to preview a merge of contacts that don't, the same rule the merge endpoint enforces.\n{% /admonition %}\n\nWhen `allowed` is `false`, `reasons[].code` is one of:\n\n| code | meaning |\n| --- | --- |\n| `source_same_as_target` | The source contact (`from`) and the destination contact (`into`) are the same contact. A contact can't be merged into itself. |\n| `invalid_merge_role_pair` | The `from`/`into` roles aren't mergeable. `into` must be a user. |\n| `no_shared_identifier` | The contacts share no email or phone. The source's phone also counts as shared when it matches the destination's WhatsApp number. Set `skip_duplicate_validation` to preview anyway. |\n| `facebook_user` | Facebook contacts can't be merged. |\n| `external_lead_channel_not_allowed` | The source is an external-channel lead that isn't eligible for merging. |\n| `mailing_list` | Contacts created from a mailing list can't be merged. |\n| `whatsapp_data_cannot_be_merged` | The WhatsApp number on the source contact can't be reassigned to the destination. |\n| `telegram_data_cannot_be_merged` | The Telegram sender on the source contact can't be reassigned to the destination. |\n| `ms_teams_data_cannot_be_merged` | The destination contact already has a Microsoft Teams sender for the same team as the source contact, so the source's sender can't be reassigned to it. |\n| `phone_data_cannot_be_merged` | The phone data on the source contact can't be reassigned to the destination. |\n\nRequires the `read_write_users` OAuth scope.\n","properties":{"headers":{"type":"object","properties":{"Intercom-Version":{"$ref":"#/definitions/intercom_version","enum":["2.17"]}},"required":[],"additionalProperties":false},"body":{"$ref":"#/definitions/merge_preview_request","examples":[{"from":"6762f0d51bb69f9f2193bb7f","into":"6762f0d51bb69f9f2193bb80"}]}},"required":[],"additionalProperties":false,"definitions":{"intercom_version":{"description":"Intercom API version.</br>If you omit the header, the API uses the version set in your app package, and 1.0 if none is set.","type":"string","enum":["1.0","1.1","1.2","1.3","1.4","2.0","2.1","2.2","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17"],"examples":["2.17"]},"merge_preview_request":{"description":"Preview a contact merge.","type":"object","title":"Merge preview request","required":["from","into"],"properties":{"from":{"type":"string","description":"The unique identifier for the contact to merge away from (the source contact).","examples":["6762f0d51bb69f9f2193bb7f"]},"into":{"type":"string","description":"The unique identifier for the contact to merge into (the destination contact). Must have a `role` of `user`.","examples":["6762f0d51bb69f9f2193bb80"]},"skip_duplicate_validation":{"type":"boolean","default":false,"description":"When `true`, previews the merge even if the contacts don't share a common identifier. Must be a JSON boolean; the string `\"true\"` does not bypass the check. Defaults to false."},"custom_attribute_names":{"type":"array","description":"Custom attribute names to include in the previewed attribute changes.","items":{"type":"string"}}}}}},"name":"Preview a contact merge","id":"intercom.previewmergecontact","example":{},"maxRequests":1,"summary":false}}