How to add a Click-to-Call/Email/WhatsApp button

In case you want to redirect the user to another url please check this other article

Or if you want to try it out, check the bottom-right widget ;)

Click-to-Call - Redirect visitor to a phone number

This Workaround is suitable for embedded bots. It is not intended to be used with the Share URL option.

The process will be as follows:

  1. In our bot, after a button we will add a Code Block, like in the picture below:

With the following code:

Landbot.send('sendto','tel:+3411223344')

Change the phone number according to your needs.

  1. In the site where the bot is embedded you need to add the following code (it will trigger the redirection):

myLandbot.on('sendto',(data) => { 
window.location.href = data;
})

Click to Email

The process will be as follows:

  1. In our bot, after a button we will add a Code Block, like in the picture below:

With the following code:

Landbot.send('sendto','mailto:feedback@landbot.io')

Change the email according to your needs.

  1. In the site where the bot is embedded you need to add the following code (it will trigger the redirection):
    myLandbot.on('sendto',(data) => { 
    window.location.href = data;
    })

Click to WhatsApp

The process will be as follows:

  1. In our bot, after a button we will add a Code Block, like in the picture below:

With the following code:

Landbot.send('sendto','https://api.whatsapp.com/send?phone=34123123123')

Change the phone according to your needs.

  1. In the site where the bot is embedded you need to add the following code (it will trigger the redirection):

myLandbot.on('sendto',(data) => { 
window.location.href = data;
})


How did we do?


Powered by HelpDocs

Powered by HelpDocs