Hide ticket forms based on user's organization (Professional Add-on and Enterprise)

Have more questions? Submit a request

40 Comments

  • Drew Hayes

    @Ryan, 

    Thanks for sharing! As I am not an experienced coder by any means, would you please point out which portions of your code need to be replaced (forms, tags, etc.) within your example before I try to implement it and get something wrong? I tried in testing a bit, but apparently did something incorrect. 

    0
  • Ryan M Mayes

    Hi Drew,

    Using the code as-is, add a prefix to each ticket form name that matches a tag on the users that you want to see that ticket form.

    For example:

    User John has tag "learner". If you rename a ticket form to "learner - repair form", John will be able to see the form, but other users who do not have the "learner" tag will not be able to see the form.

    -Ryan

    0
  • Drew Hayes

    Ahh - Thanks, Ryan. That makes sense. Too easy - I was trying to over complicate it! :) 

    0
  • Jessie Schutz

    Hey Ryan! 

    Thank you so much for coming back to answer questions about your comment! If you'd like, feel free to write it up for our Tips & Tricks topic. You'll get swag in addition to fame. :)

    0
  • Dan Derks

    Hi Ryan!

    In the midst of expanding my org's use of ZenDesk to include internal support. I want to create a form that only folks who are tagged with 'isr' (Internal Support Requester) can see. I copied your original code into my script.js file and have renamed a form 'ISR - request', but the form remains publicly available.

    Any guidance (though you've provided more than enough over the years!) would be appreciated :)

    Best,

    Dan

    0
  • Mike West

    What's the best method for hiding a specific form always, regardless of the user's organization or any other criteria?

    I have a form that I'd like to link to from a very specific Help Center article only. I don't want a user to ever be able to select this form from the drop-down list.

    Thanks in advance.

     

    0
  • Jessie Schutz

    Hi Mike!

    I imagine that you can use code similar to this to hide the form from all users, rather than just certain users. All this does is remove it from the dropdown so users can't select it - the form still exists, and you should be able to link directly to it. I can't help with code specifics but we have plenty of helpful tips provided by community members that can help get you started!

    0
  • Uriel Flores

    Hello,

     

    We currently have 1 default form, which all organizations use. We included an additional form for 8 organizations that have an additional service, aside from their current. We used the script above and successfully works. However, is there a method that we can use for all organizations that do not have the additional service that we offer, be directed straight to our default form, instead of having to select the default form from the drop-down menu? Currently, organizations that do not have our additional service, have to click the default form to submit a regular ticket, which is an additional step for them (other form is hidden). Is there a way to show our 8 organizations the two different forms only, and not have the other organizations have to select the only form that they need to submit a ticket and just be directed to the default ticket form?

     

    Thanks.

    0
  • Fernando Duarte

    I would give those users a direct link to the specific form rather to the forms page

    0
  • Anders Vännman

    Pew. This was advanced for a much needed feature. Would be so much nicer if one it was possible to do this right from the admin interface, where i create the ticket forms, a field "show only for  these organisations" and "show only for users with these tags", or something similar.

     

    0

Please sign in to leave a comment.

Powered by Zendesk