Allowing end users to view Guide but not create tickets

4 コメント

  • Andrew Soderberg
    Community Moderator

    Yes, this is possible using tags and a javascript in your Guide templates. At my last company, our Zendesk Guide was available to all customers (direct and those through resellers), but only direct paid customers could submit support tickets. The customers of our resellers had to contact their reseller for support.

    This was differentiated in Zendesk Support by adding a tag like 'paying' to the company record of those customers who are allowed to submit tickets.

    The javascript looks for to the company record of the logged in user and checks for the existence of the tag 'paying'. If it finds it, it will show the links to submitting tickets (as well as being able to see past tickets etc.). if it does not, they are hidden from rendering in the Guide view. There is a thread here in the Zendesk community that covers this. I will look for it and add a link to that thread.

     

    1
  • Andrew Soderberg
    Community Moderator

    Here is the article that we based our setup on: https://support.zendesk.com/hc/en-us/articles/204579603

     

    1
  • Grey McGowan

    Thank you so much Andrew for all that! I've been trying this, https://support.zendesk.com/hc/en-us/articles/224926148-Restricting-ticket-submission-to-specific-users-within-an-organization but having no luck, so hopefully this method will provide another option.

    0
  • Andrew Soderberg
    Community Moderator

    Grey,

    Here is the javascript that I used to implement this. Note that my solution is done at the organization level, not at a user level within the organization. So my solution is binary. Either a company is 'paying' (so all users within that org  get to submit tickets), or the organization is not paying for support (no tag) so all the users from the non-paying company can only see knowledge base articles (and community).

    Before you implement this be sure to add 'paying' as a tag to all the organizations that should be able to see, created, and comment on Support tickets. As this will hide those items from the Browser UI if there I no 'paying' tag. 

    Also note, that the CSS classes I have below I believe are the standard ones used in all Zendesk Guide themes, but it is possible that in the Guide theme you use, these CSS classes may be different.

    I added this to the end of the script.js file for the Guide theme we use.

    // Show the My Activities and Submit a Request links for organizations with the paying tag inherited from their Organization membership.

    $(document).ready(function()
    {


      (function() {
        var isCust;
        // find the tag in the array
        function isCustomer(element, index, array) {
        return (element === 'paying');
        }
    //go through the HelpCenter object and look for org tags
        HelpCenter.user.organizations.forEach(function(x) {
          isCust = x.tags.some(isCustomer);
          return (isCust === true);
        });
    //if this a paying organization then show them the support and activities views/links
        if (isCust === true) {
    $('.submit-a-request').show();
    $('.custom-block--submit').css('display', 'block');
        $('.my-activities').show();
        $('#user-menu .my-activities').css('display', 'block');
    $('.footer-submit-ticket__btn').css('display', 'inline-block');
    $('.footer-submit-ticket__title').show();
    $('.footer-submit-ticket__subtitle').show();
    $('a.submit-a-request').show();
        }
    }());

    // Show div html based on role

    if (HelpCenter.user.role=="agent"){
    $("div.agent").show();
    $('.submit-a-request').show();

    }

    if (HelpCenter.user.role=="manager"){
    $("div.agent").show();
    $('.submit-a-request').show();

    }

    });

     

    0

サインインしてコメントを残してください。

Powered by Zendesk