Have you ever wanted to let your users open a live chat with your team with a pre-populated message?
Use cases may vary and it's a great addition to your customer experience.
Let's say you want a customer reach you out when they click on a button to upgrade to an Enterprise plan, you can do this and add a pre-populated message such as: "Hey team, I need to speak to the Sales team for an Enterprise plan".
The JS API code to use to open your live chat with a pre-defined message is the following
customerly.showNewMessage('Hey team, I need an Enterprise plan for my project, can you help?');
So if you want to add to your button the opening of the live chat with a pre-defined message this is the code you might want to use
<button onclick="customerly.showNewMessage('Hey team, I need an Enterprise plan for my project, can you help?')">Upgrade to Enterprise</a>
If you want to understand how to interact more with the live chat API follow this tutorial here.
If you want to see this in action click on the 🙁 below.
Cool isn't it?