How do I display the Web Widget to signed in users only?

Have more questions? Submit a request

6 Comments

  • SeanR
    Comment actions Permalink

    Is there a way to make it so that the user is not asked for their name or email address? Seams redundant of they are logged in to ask them what we should already know.

    0
  • Raphael Abadie
    Comment actions Permalink

    Yes with zE.identify : https://developer.zendesk.com/embeddables/docs/widget/api#content

    0
  • Heather R
    Comment actions Permalink

    Wondering what the code is if the user is an Agent, to show/hide certain forms or fields?

    0
  • Jessie Schutz
    Comment actions Permalink

    Hey Heather!

    Can you give some more information on why you'd need to hide web widget fields from agents? Theoretically they wouldn't be using it...

    0
  • Gaëtan Tobie-Echeverria
    Comment actions Permalink

    hello,

    is there a way to go deeper in signed_in user and have user segment instead ? 

    1
  • Brett - Community Manager
    Comment actions Permalink

    Hi Gaëtan,

    There's no native way to drill down into the user segment. However, you may be able to restrict this to users that have a certain tag on their profile.

    Here's sample snippet below that could work:

    if($.inArray('example_tag', HelpCenter.user.tags) != -1) {
    window.zESettings = {
    webWidget: {
    chat: {
    suppress: true
    },
    contactForm: {
    suppress: true
    },
    helpCenter: {
    suppress: true
    },
    talk: {
    suppress: true
    },
    answerBot: {
    suppress: true
    }
    }
    };
    }

    Hope this helps!

    0

Please sign in to leave a comment.

Powered by Zendesk