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

59 Comments

  • Vinay Gupta
    Comment actions Permalink

    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?

     

    Thanks

    3
  • Aaron U'Ren
    Comment actions Permalink

    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.

    3
  • Mantas K
    Comment actions Permalink

    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.

    2
  • Alexis Fabre Ringborg
    Comment actions Permalink

    +1

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

    1
  • Jon Hughes
    Comment actions Permalink

    This is a great idea and definitely needed ASAP.

    2
  • Joseph McCarron
    Comment actions Permalink

    I know you said no JavaScript solutions... but I couldn't help myself.

    Here is a limited solution using custom JavaScript in Help Center:  https://support.zendesk.com/entries/87397-pre-populate-the-new-ticket-form-?page=1#post_25488048

    This is not officially supported or the official answer from Zendesk to this thread, just a contribution for anyone who wants to try it out.

    Cheers,

    Joe

    0
  • Alexis Fabre Ringborg
    Comment actions Permalink

    Hello

    +1

    1
  • Sander Nelen
    Comment actions Permalink

    +1 ASAP please

    1
  • Simon N
    Comment actions Permalink

    +1, we really would benefit from this!

    1
  • Stijn
    Comment actions Permalink

    +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;

    https://<domain>.zendesk.com/tickets/new?ticket[requester]=stijn@somedomain.com

    1
  • Bram Gooris
    Comment actions Permalink

    +1 We need this aswell! 

    2
  • &y
    Comment actions Permalink

    From the answer that Joe linked to above, James Rosen demonstrated how to do this:

    For anonymous requests, you can use

    ```

    /anonymous_requests/new?ticket[subject]=subject+here&email=email@domain.com

    ```

    For signed-in requests by an end-user, you can use

    ```

    /requests/new?ticket[subject]=subject+here

    ```

    You can also pass a ticket[requester_id] parameter if you know that -- say from the API -- but it won't accept an email address.

    For signed-in agents, the URL is just like for signed-in end-users, but use "/tickets/new " instead of " /requests/new ."

     

    To elaborate a little, if you have custom fields, they can be addressed, as well:

    ```

    requests/new?ticket[fields][12345678]=custom+value+here

    ```

    0
  • Tom H.
    Comment actions Permalink

    Unfortunately the Javascript code in the thread that Joe linked to doesn't seem to work anymore. Added it to my New Request form, but the parameters are ignored. Too bad, I'd also really like this feature. 

    1
  • Greg Sohl
    Comment actions Permalink

    I tried what &y wrote for signed-in agents. It did not work for me.

    https://xxx.zendesk.com/hc/en-us/requests/new?request[subject]=Check+This+Out

    Did I get that right??

    1
  • Tim Herby
    Comment actions Permalink

    Doesn't work for me.  Is this still not possible after 4 years?

    Can someone from Zendesk reply tot his?

    1
  • Greg Sohl
    Comment actions Permalink

    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.

    Greg

    4
  • Matt Farrington Smith
    Comment actions Permalink

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

    Can we get an official word on it?

    Matt

    2
  • Jose Cerna
    Comment actions Permalink

    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?

    2
  • Nicole - Community Manager
    Comment actions Permalink

    Hey all - 

    I've added this to my list of questions for Product. In the meantime, Jose, see if this JS works for you:  

    (Copied and pasted from a comment made by Community member PaulAlexander on 4/4/10 that lives in a now-archived thread) 

    location.href.replace(

    new RegExp("([^?=&]+)(=([^&]*))?", "g"),

    function($0, $1, $2, $3) {

    var f = $($1);

    if( f ) f.value = unescape($3);

    }

    );

    location.href.replace( new RegExp("([^?=&]+)(=([^&]*))?", "g"), function($0, $1, $2, $3) { var f = $($1); if( f ) f.value = unescape($3); });

    It can be placed in any custom widget or even a global script.

    1
  • Sergio Negri
    Comment actions Permalink

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

    3
  • Gtagliabue
    Comment actions Permalink

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

    3
  • Tim Herby
    Comment actions Permalink

    @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.

    3
  • Nicole - Community Manager
    Comment actions Permalink

    Hi Tim, 

    The product team has not given me an update, but I have pinged them again. We definitely hear you and see where you're coming from. 

    At the moment preparing for GDPR compliance has taken up a lot of the bandwidth in product development, but soon they'll be planning for things after that rollout and hopefully that will free up some resources. 

    0
  • Jose Cerna
    Comment actions Permalink

    Nicole thank you for staying on top of this, I ended up using google form instead in the mean time. However I would still like this to be just part of the Zendesk package. As other have stated this will decrease back and forth with customers if we can make it easy for them to provide data. Yes this can be done using the API like I did with google forms, but this will be a great addition and sale benefit to your customers (us) and ours.

    0
  • Justin
    Comment actions Permalink

    +1 We used to have this functionality and now that we think about it, it's no longer working.

    0
  • Tom Wilson
    Comment actions Permalink

    This is possible.

     

    Zendesk does this when you create a ticket from your own Zendesk, they fill out the data such as your sub-domain.

    So Zendesk does have a way of doing this - let us customers use it!

    1
  • Justin
    Comment actions Permalink

    Any update on this request?

    2
  • Nicole - Community Manager
    Comment actions Permalink

    Hi all - 

    I've been offered this solution by some internal folks: If you're looking to pre-fill user info, it is possible with the Web Widget using the `zE.identify(userObj)` method, though it requires some form of authentication on the web page being used. More info on that is here: https://developer.zendesk.com/embeddables/docs/widget/api#ze.identify

     

    0
  • HelpBetter
    Comment actions Permalink

    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 (document.location.search);
       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.

    1
  • Justin
    Comment actions Permalink

    ^ @HelpBetter, that didn't work for me. Do I need to add a rule for a specific form ID?

    1

Please sign in to leave a comment.

Powered by Zendesk