Merging contacts from different messengers
This function allows you to change the channel of communication avoiding the limitation of 24 hours.

Merging contacts

Attention! To create links for moving from one messenger to another, the messengers have to be connected to the project
get_merge_link(client_type, tag, group) - the function returns the link that, when moving through it, transfers the client to the specified bot, where
client_type - a mandatory parameter, a number that shows to which messenger the move happens: 1: 'telegram', 2: 'viber', 3: 'facebook', 6: 'whatsapp', 10: 'instagram'
tag - a message that a client receives after the move (the same as in the mini-landings), an optional parameter
group - bot id, you can find it in the list of connected bots, an optional parameter
Pay attention to the fact that if there are more than one bot from the same messenger connected to the same bot and the parameter group isn’t put in, then the link will form with the first found connected bot.
The function returns the link of this kind:
An example of forming a link for moving to Telegram:
link = get_merge_link('1') - the link to the first found bot on Telegram in the project, without the tag link = get_merge_link('1', '', 'testbot') - the link to the specific bot without the tag link = get_merge_link('1', 'changed the chat', 'testbot') - the link to the specific bot with the tag

Important notes

  • Instagram links If you generate a link to Instagram, then a unique text_to_merge_contact variable with the value of this kind: cli123 (special for every connection) will be added. After moving to Instagram you need to ask the client to send this text in DMs.
  • WhatsApp links
    After the client clicks on the link that leads to WhatsApp, the text of this kind cli123 will be placed automatically into the input field of the client. They have to send it to the chat, otherwise the merging won’t happen. Additionally, when generating links to WhatsApp the variable text_to_merge_contact with the same value will be added.
    It’s recommended to notify the client about the importance of sending this text to the chat after the move.
Attention! The variable text_to_merge_contact is deleted or rewritten with every new link generated for Instagram or WhatsApp.

Deleting the connections of different messengers

unmerge_client() - the function allows to “untie” the client’s current contact from other chats. It’s used without any parameters.

Callbacks after successful merging

After you successfully merge contacts, in the client card you’ll see the tab Related dialogs:
View from the Viber tab vs view from the Telegram tab
After the successful move to the new messenger, the client gets a new callback switch_to_ with a note. For example, switch_to_telegram if a client moved to Telegram.
Copy link
On this page
Merging contacts
Important notes
Deleting the connections of different messengers
Callbacks after successful merging