Chat Triggers
What do we mean by chat triggers exactly? A chat trigger is an action that makes the chat open or appear
Click button or link on website to open chat window
You can set a button or link on the website to make the chat pop open (maximize):
To implement this function, you must add an onclick and class attribute to the link or button. Those attributes should contain the following:
onclick="$$weply && $$weply.api.maximizeWidget()" class="triggerChat"
Click button or link on website to load chat for the first time
This is an option for you who wants to implement the chat as a native part of the contact opportunities, or want to activate the chat on specific scenarios.
⚠️ The provided information is ONLY for the functionality, no design of button or links or other elements. Please contact the one responsible for your website for that.
Getting started
Have your Weply Chat Code ready
1. Firstly, add the following script to your site. This is the Weply Chat in a no-id state:
<script src="https://app.weply.chat/widget" >async></script>
With this script, only the most necessary tools are loaded.
2. To make the chat appear on a button or link click, you will be adding an onclick and class attribute to it. On a button it would look something like this:
<button onclick="$$weply && $$weply.api.loadWidget('2402',false)"> Load weply chat for the first time </button>
a. The numbers marked red above is where your ChatID should be placed. The chat ID is the last part of the script source. See example below:
<script src="https://app.weply.chat/widget/2402" async>></script>
In reality, your ChatID may be a mix of numbers and letters and very long.
b. the false parameter above marked purple will cause the chat to be maximized on the default. That means with the code above, whole chat window will appear like shown below:
If you only want the widget to appear and not the whole box, change the false parameter to true for the following result:
Possible variations
Hidden Widget
If you want the Widget to be hidden completely by minimizing the chat, this is possible. Ask your Customer Success Manager to update the Chat Trigger theme to Hidden.
This is useful if you have created your custom button or Chat Trigger for your site, like this one:
Need help?
+45 89 87 91 00
Friday: 8.30 am - 3.30 pm (GMT+1)