Can I have more than one Web Widget?

Have more questions? Submit a request

3 Comments

  • Jennifer Robichaux
    Comment actions Permalink

    We provide links on our website for our users to create an email or start a chat with our support team. We would like to have the Web Widget launch after clicking one of these links, that are hardcoded into our website.

    We would also like to launch a different form of the Web Widget depending on which link is clicked.

    • When Chat is clicked, we want the live chat form to open.
    • When Email is clicked, we want the contact form to open.

    Is there any way to customize the Web Widget to go directly to the specific form, based on where it is launched from?

    0
  • Devan - Community Manager
    Comment actions Permalink

    Hello Jennifer,

    I'll go ahead and see if I can find someone to help you with this custom code request. For now, I've included this article that goes over the basics of tackling a project like this on your own.

    Introduction to Web Widget

    Best regards.

    0
  • Simon Blouner
    Comment actions Permalink

    Hey Jennifer,

    What you want should be possible, in some way. Below is a snippet I quickly made.

    The snippet is listening to two buttons, on with class "chat-btn", and one with class "form-btn".

    The script supresses Widget functionality depending on what ever button you click.

    So when clicking Chat button, everything except chat is supressed, and vice versa for the form button.

    The first part of the below, is hiding the Widget from the start. I'm not sure if you want this or not, but now it's included

    Please be aware that I haven't really tested this except for looking if the Widget opens the two wanted functionalities or not.

    Sorry for the non-pretty formatting :P

    <script type="text/javascript">
    zE('webWidget', 'hide');
    zE('webWidget:on', 'close', function() {
    zE('webWidget', 'reset');
    zE('webWidget', 'hide');
    });

    $( document ).ready(function() {
    //Chat button
    $( ".chat-btn" ).click(function() {
    zE('webWidget', 'reset');
    zE('webWidget', 'updateSettings', {
    webWidget: {
    contactForm: {
    suppress: true
    },
    helpCenter: {
    suppress: true
    },
    talk: {
    suppress: true
    },
    answerBot: {
    suppress: true
    }
    }
    });
    zE.activate();
    });
    //Form button
    $( ".form-btn" ).click(function() {
    zE('webWidget', 'reset');
    zE('webWidget', 'updateSettings', {
    webWidget: {
    chat: {
    suppress: true
    },
    helpCenter: {
    suppress: true
    },
    talk: {
    suppress: true
    },
    answerBot: {
    suppress: true
    }
    }
    });
    zE.activate();
    });
    });
    </script>

     

    #helpsome regards,
    Simon Blouner
    Zendesk Consultant @ helphouse.io

    0

Please sign in to leave a comment.

Powered by Zendesk