Pre-populate ticket submission form field via query string (Help Center)



  • Official comment
    Zendesk Voice of Customer Team

    Hi everyone! 

    Thanks for all of your feedback on this issue. We understand it's been difficult to give your users a more seamless experience without using some extra custom coding. Our product team is planning to address this issue. 

    Again, we really appreciate you all voices your need and especially those who went into detail about what their business goals are. This helps us understand the full scope and impact to your business. 

    Stay tuned for more updates on this issue!

  • Harrison Dimon

    Can't stress enough how important this is to so many people for so many reasons. Please prioritize

  • Gonzalo

    I can't believe yo can't pre-populate a form using url params in Zendesk ... 6 years old this request and not sorted yet. Just gives you an idea on how responsive is this product to business demands. Shameful.

  • Greg Sohl

    Hello, Zendesk? We all understand there's only so much development time to go around, but this should be 101 stuff.

    The courtesy of a reply would be appreciated.


  • Sergio Negri

    @Nicole this solves the problem of parsing the URL, not how to properly set those data in the form. Or am I missing something?

  • Gtagliabue

    Can't believe this was open in 2013. Can this please get some real attention?

  • Tim Herby

    @Nicole, do you have an update from the product team?  We could critically use this to capture some simple information about our customers that we already have in-product, rather than making them type it in again in the helpdesk.  This means we have a huge loss of information when people click over to the help form.  If we could simply capture the UserID reliably, that would be huge.

    Your customers have been asking for this feature for 5 years, and it's a simple feature, just capturing values and pre-filing one form.  As the CTO of a software company, I know you have many competing priorities, but I also know this is a simple change.  I implore you to consider the small size of this feature and the obvious customer demand as evidenced in this thread.

  • Tim Herby

    Jira has this feature for filing bugs and tickets.

    It's very standard part of how the web works (link to a form and pre-fill information), and your customers have been asking for 5 years.  The lack of response to this ticket, and continued inability to take it seriously is one of the reasons we are looking to leave Zendesk.

  • Chad Hensley

    Another vote to have Zendesk natively support this feature.

  • Vinay Gupta

    In my opinion this is one functionality which is very critical for me because it relates to the effort which my customers need to make to report their issues. Pre-populating the fields makes it immensely effective and ensures that they find it a quick and fruitful experience.


    Can we expect this feature being implemented in near future?



  • Aaron U'Ren

    We would also like this feature. This is a feature that was implemented for the previous interface, but now, as the thread Tom pointed out mentions, this no longer works with the new ZenDesk interface. This is really useful to our business as we have an application that already has most of the information needed for the ticket submission form available to it. Our support agents use this application as a first lookup to verify user identity and other information. However, when it comes time to making a ticket, they then have to go to ZenDesk and enter all of the same information over again. It would be very helpful to be able to craft a URL that would set the information on the ticket that our support agent has already looked up.


    This feature was deemed important enough to add to the last interface, I think that it deserves to be brought back in the new interface.

  • Mantas K

    Totally agree. We would like to include a Zendesk link into our CRM with default values for a ticket. Then the agent would be able to further complete the ticket. With API you cannot create a draft ticket.

  • Alexis Fabre Ringborg



  • Sander Nelen

    +1 ASAP please

  • Simon N

    +1, we really would benefit from this!

  • Bram Gooris

    +1 We need this aswell! 

  • HelpBetter

    I came to this post looking for a solution as well. I was able to add this by including the following script in my global help center .js file:

    prepopulateSupportTicket ();

    function prepopulateSupportTicket ()
       var params = getQueryParams (;
       if (params.subject) $("#request_subject").val (params.subject);
       if (params.body) $("#request_description").val (params.body);

    function getQueryParams (queryString)
       queryString = queryString.split ('+').join (' ');

       var params = {};
       var tokens;
       var regex = /[?&]?([^=]+)=([^&]*)/g;

       while (tokens = regex.exec (queryString))
          params[decodeURIComponent (tokens[1])] = decodeURIComponent (tokens[2]);

       return params;


    Hope this helps someone.

  • Matt McLean
    Community Moderator

    Here's the code I added to our "new_request_page.hbs" to get this functionality:

    (function ($) {
    var aliases = {
    //this section is optional. the integers for your custom
    //fields can be found by going to the edit page for each field

    //'user_friendly_custom_field_name1': 'custom_field_id_(integer1)'
    //'user_friendly_custom_field_name2': 'custom_field_id_(integer2)'
    var parsedQueryString = function () {
    var segments =\+/g, ' ').split('&'),
    parsed = {};
    if (!segments) return parsed;
    for (var i = 0, count = segments.length; i < count; i++) {
    var parts = segments[i].split('='),
    key = parts.shift(),
    value = parts.length ? decodeURIComponent(parts.join('=')) : null;
    parsed[key] = value;
    return parsed;
    $(document).ready(function () {
    var query = parsedQueryString();
    for (var key in query) {
    if (!query.hasOwnProperty(key) || key == 'ticket_form_id') continue;
    var prefix = '#request_',
    value = query[key];
    if (typeof aliases[key] !== 'undefined') {
    key = aliases[key];
    if (key == 'email') {
    prefix += 'anonymous_requester_';
    } else if (/^\d+$/.test(key)) {
    prefix += 'custom_fields_';
    var field = $(prefix + key),
    data = field.attr('data-tagger');
    if (data) {
    data = JSON.parse(data);
    var label = '';
    if (!value) {
    label = data[0].label;
    } else {
    for (var i = 0, count; i < data.length; i++) {
    if (data[i].value == value) {
    label = data[i].label;
    } else {

    All of the above code was lifted from the old pre-populate the new ticket form ? – Zendesk Support comments page which seems to have gotten removed. A version of the above code was originally shared by Ian Beck -- see

    I added the above script to one of my help centers almost 2 years ago (Copenhagen theme) and it has continued to serve me well.
    You can pre-fill the 'description' field by simply using:


    You can pre-fill any custom fields by either using their identifier integer in the URL, or if you use the optional "aliases" section, you can use a friendly human-readable name for each custom id.. for example, we were using it in location-based kiosks to auto-populate the "location" dropdown menu (which corresponds to a tag):

    (Obviously you'd have to change your subdomain, locale, and your ticket form id for it to work. If you are trying to pre-populate dropdown fields, the "tag" that you put in for your custom field needs to be valid.)

    Thanks again to Ian Beck for this code!

  • Anders Vännman

    I agree totally!

    For an example

    We are in a process where we want to use a HR-managment system for onboarding, the company that develops that solution are prepared to forward some of the process to our Zendesk with a query string for completion of some IT-specific fields that arent available in the HR-system (and shouldnt be managed there).

    But it cant really be done out of the box... 



  • Blakelee Mills

    Adding my vote for ZenDesk to support this feature without the use of a paid-for app. 

  • Anders Vännman

    I have given up on Zendesk adding any useful new features, like this one.


    If it wasnt for the fact they have the (in my opinion) best gui for IT helpdesk we would have left them for good. 

  • Jon Hughes

    This is a great idea and definitely needed ASAP.

  • Stijn

    +1, please see ticket #1005373 that I've raised about this.

    An easy integration with this is so much more preferable then;

    • looking up of the user exists, through the API;
    • create the user if he doesn't, through the API;
    • create and pre populate the ticket through the API;
    • redirect the user to the correct place afterwards.

    Especially when you're doing a non-complex integration with Zendesk like replacing a "mailto" functionality.

    Here's how we do this with the current URL structure on the "old" forms;


  • Matt Farrington Smith

    This would be welcomed - can't believe it doesn't exist already.

    Can we get an official word on it?


  • Jose Cerna

    I agree this would help my users so much, I can't see javascript example. that Joe wrote because I don't have access. Can you repost or set it to public again?

  • Justin

    Any update on this request?

  • Dominik Kuhn

    Indeed! It's ridiculous how less Zendesk cares about its customer request.

    Even with JS, we are highly limited in building solutions.

    They should allow end-users to access the ticket fields API. Then we could at least code proper prefill functions.

  • Forrest Jacoby

    +1 here. Seven years is making Salesforce look nimble by comparison.

  • Thomas Verschoren
    Community Moderator



    The code below works for every field with the bold part replaced with the ID of the dropdown and the TAG of the field option

    $(document).ready(function() {
    /* Start QR */
    var getUrlParameter = function getUrlParameter(sParam) {
    var sPageURL =,
    sURLVariables = sPageURL.split('&'),

    for (i = 0; i < sURLVariables.length; i++) {
    sParameterName = sURLVariables[i].split('=');
    if (sParameterName[1] == "false"){$("#" + sParameterName[0]).prop("checked",false);}
    else if (sParameterName[1] == "true"){$("#" + sParameterName[0]).prop("checked",true);}
    else {$("#" + sParameterName[0]).val(decodeURIComponent(sParameterName[1]).replace(/\)\(/g, "<br/>"))};
    /* End QR */
  • Alexis Fabre Ringborg


    We were also using this feature previously and it is not working anymore, so this is a loss for us


Please sign in to leave a comment.

Powered by Zendesk