post https://api.whippy.co/v1/contacts/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_contactwill have:- its
emailandphonefields set tonull - its
statevalue set tomerged - will no longer be accessible/visible/usabl (as its information will now belong to the
to_contact).
- its
-
The
to_contactwill have:- its
emailandphonefields set to the values of thefrom_contactif they are notnull. Otherwise, it will keep its current values.
- its
-
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:
emailconversations are inherited by theto_contact.phoneconversations:- are inherited by the
to_contactfor 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.
- are inherited by the
whatsappconversations follow the same rules asphoneconversations.- 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_contactdoesn't have preferences,to_contact's preferences remain unchanged. - if
from_contacthas preferences,to_contactloses its current ones and inheritsfrom_contact's.
- if
-
Conversation Agent Session:
- All currently existing agent sessions
to_contacthas remain unchanged. - All new ones are inherited by
to_contact's respective conversations.
- All currently existing agent sessions
-
Contact Integration:
- All are inherited by
to_contact.
- All are inherited by
-
Contact Tag:
- Any currently existing tags
tocontacthas remain unchanged. - All new tags are inherited by
to_contact.
- Any currently existing tags
-
Note:
- Any currently existing notes
to_contacthas remain unchanged. - All new notes are inherited by
to_contact.
- Any currently existing notes
-
Any existing data related to Sequence Runs, Steps, Campaigns that
from_contacthas is updated to point to theto_contactrespectively (as it's the inheritor offrom_contact). -
No other information(data) is moved/merged/inherited by the
to_contact.
-
Callback
