Open chatbot when user clicks on a custom button
已于 2024年3月26日 发布
I'm working on a help center page where I implemented 3 icons with links. In one of these links I need that when the customer clicks on it, the chatbot present in the Help Center opens to start customer service. I've already tried using the codes provided by Zendesk itself on the developer documentation portal (https://developer.zendesk.com/documentation/classic-web-widget-sdks/web-widget/quickstart-tutorials/creating-a-launcher- for-the-web-widget/) and I tried to use some other codes I found on the internet (https://stackoverflow.com/questions/31247753/activate-zendesk-widget-using-javascript-trigger), but none of the codes used It worked. Below I leave the code where I want the user to click to open the chat with the last attempt I made.
home-page
<div class="column-container-principal container-link">
<a id="start-chatbot" href="javascript:$zopim.livechat.window.show();">
<img title="chat" src="https://theme.zdassets.com/theme_assets/526457/bd9e1c8f4757f99fbc652c33a75d27f21be236b7.svg" />
<div class="p_rodape_h click-chatbot-atendimento container-link-label">
Chat Online
</div>
</a>
<div class="container-link-description container-link-description-chat">
Atendimento de Segunda à Sexta das 8hrs às 17hrs
</div>
</div>
script.js
$zopim(function() {
$zopim.livechat.hideAll();
});
1
2 条评论
João Vitor Pitta
I managed to solve it by implementing the following code:
home page
<a id="start-chatbot" href="javascript:openChat();">
script.js
function openChat() {
zE('messenger', ‘open’);
}
0
Alix Lepinay
I would need this too !
0
登录以发表评论。