Merge Contacts

Merges two contacts into one.

  • Parameters:

    • from_contact_id - the ID of the contact to be merged into the main contact.
    • to_contact_id - the ID of the contact in which the merge will be performed.
  • Once merged, the from_contact will have:

    • its email and phone fields set to null
    • its state value set to merged
    • will no longer be accessible/visible/usabl (as its information will now belong to the to_contact).
  • The to_contact will have:

    • its email and phone fields set to the values of the from_contact if they are not null. Otherwise, it will keep its current values.
  • Many records in related tables are inherited, merged, overwritten, deleted or updated based during the merge process.

    • Conversations, Messages, Message Attachments, Contact Events, Conversation Events:

      • email conversations are inherited by the to_contact.
      • phone conversations:
        • are inherited by the to_contact for channels it doesn't already have conversations with.
        • have their messages and attachments transferred to the corresponding existing conversation for every channel it already has conversation on.
      • whatsapp conversations follow the same rules as phone conversations.
      • All Scheduled Message Jobs for the inherited messages are deleted.
      • All Contact Events are inherited by the to_contact.
      • All Conversation Events are inherited by the to_contact (and shown in the respective conversation).
    • Communication Preference:

      • if from_contact doesn't have preferences, to_contact's preferences remain unchanged.
      • if from_contact has preferences, to_contact loses its current ones and inherits from_contact's.
    • Conversation Agent Session:

      • All currently existing agent sessions to_contact has remain unchanged.
      • All new ones are inherited by to_contact's respective conversations.
    • Contact Integration:

      • All are inherited by to_contact.
    • Contact Tag:

      • Any currently existing tags tocontact has remain unchanged.
      • All new tags are inherited by to_contact.
    • Note:

      • Any currently existing notes to_contact has remain unchanged.
      • All new notes are inherited by to_contact.
    • Any existing data related to Sequence Runs, Steps, Campaigns that from_contact has is updated to point to the to_contact respectively (as it's the inheritor of from_contact).

    • No other information(data) is moved/merged/inherited by the to_contact.

Callback
Language
Credentials
Header
Click Try It! to start a request and see the response here!