You can set up a ticket form that has pre-filled values in specific fields (such as the Subject or Description fields). This can save time for your end users and get them closer to a resolution. It also benefits your support agents by ensuring they have accurate and specific input from customers.
For example, if an article in your help center explains how to troubleshoot a coffee maker, you can create a link at the end of that article that opens a ticket form pre-populated with the coffee maker model and issue. Users who click this link will have much less information to fill out when submitting their ticket.
This article includes the following sections:
Configuring a pre-filled ticket form
When you create pre-filled ticket forms, you add parameters for the fields that you want to pre-fill to the URL of the form. If you have multiple ticket forms, you’ll also include the specific ticket form ID in the URL.
To configure pre-filled fields in a form
- Copy the URL for the ticket form that end users see when they click
Submit a request and paste it into a text editor file. It should resemble this, where mycompany is your subdomain: https://mycompany.zendesk.com/hc/en-us/requests/new?Note: If you have host mapping, your URL will look different from the previous example (see Host mapping - changing the URL of your help center).
- (Multiple ticket forms only) In Admin Center, click Objects and rules in the sidebar, then select Tickets > Forms. Select the ticket form you want to pre-fill, then copy the form ID from the URL in Support and paste the ID to the end of the URL in your text editor.
In Admin Center, click
Objects and rules in the sidebar, then select Tickets >
Fields. Copy the field values you want to pre-fill and
paste them along with values to the end of the URL in your text
For system values, copy the title of the field (for example "Subject"). Use the following format to paste the title at the end of the URL that you are building, along with the value that you want to assign to the field:
For custom values, copy the Field ID of the field (for example, “12345”). Use the following format to paste the Field ID at the end of the URL that you are building, along with the value that you want to assign to the field:
- Continue adding fields and values to the end of the URL in your text editor
The parameters should be similar to the following example:
&tf_subject=Faulty charger 999 recall&tf_12345=USA
- Copy the URL from the text editor and paste it wherever you want to link end
users to the pre-filled form.
Your final URL should resemble one of the following examples:
Single ticket form:
https://www.example.zendesk.com/hc/en-us/requests/new?tf_subject=Faulty charger 999 recall&tf_12345=USA
Multiple ticket form:
https://www.example.zendesk.com/hc/en-us/requests/new?ticket_form_id=1500000300222&tf_subject=Faulty charger 999 recall&tf_12345=USA
Parameter keys and values
The URL parameter keys and values differ based on what type of field you want to pre-fill. There are two different field types that are used in a request ticket form:
System fields - are the default fields in a ticket and have a unique name.
Custom fields - are fields that you can create to supplement the information that is already being gathered from the existing system fields.
The URL parameter of system fields uses the prefix
by the field name. For example
tf_subject. For more
information, see System ticket fields. Use the
following parameters for the Zendesk system fields:
Priority: Include the value type (low, norm, high, urgent), after
the field name, for example
Type: Include the value type after the field name, for example
Due date: (Used when Type=task) Use the canonical date format
YYY-MM-DD, for example
Cc: (Used when a user is logged in). Separate the emails with a
comma, not a space, for example
Organization ID: Include the value type after the field name, for
The URL parameter of custom fields uses the prefix
by the field ID. For example
tf_40630945. For more information,
see About custom field types. With custom
objects, you can create the following custom fields:
- Multi-select: Use field tags as the values and separate them with a comma, not a space, for example blue,green,red.
Drop-down menu: Use the tag associated with the value. For
- Checkbox: Use the value true/false
- Decimal: Use integers and non-integers (for example, -8.012345679). Do not use commas.
- Date: Use the canonical date format: YYYY-MM-DD
Thanks for raising this issue. The new feature is only available when your theme is using Templating API v2. Is your custom theme perhaps using Templating API v1?
Thanks for the quick reply!
I can confirm my theme is built on the API v2 - but for good measure, this should probably be added to this article as a heads-up :-)
Working on that :)
Thanks for raising this Simon Blouner, it's a good addition to the documentation.
Can we pass through text field or numeric values as well? or just the field types listed above?
@... absolutely! I think this article only wanted to specify the required format for field types where the format is non-trivial. For text and numbers, you just pass in the text or the number :-) Like:
I love this feature! Question: will this also work with conditional fields which are not visible yet when the form is opened?
Yes it also works with conditional fields, even if they're not shown initially.
That's a great feature!
I wonder if the parameter keys and values are retained when the ticket form is reloaded?
As long as the URL string is kept, if the page is reloaded, the values will be kept.
Hope that helps!
This feature is really good.
Firstly, can this be used if there is only 1 form? meaning I don't need to put in the ticket form ID.
I just want to get an idea on the dropdown values, it says to use option and value
If I have a dropdown with 2 values
VALUE = ABC, TAG = ABC_TEST
VALUE = XYZ, TAG = XYZ_TEST
What would the url be for such a case using the one I pasted above.
Appreciate your help.
The parameter value in this case would be the option value's tag. If it's a multi-select field you can comma-separate those tags as well. So in your case it seems it would be:
Thank you for your reply.
I did try it the same way you have written, however didn't work.
I will try it again and will update if successful.
Do you need a rich text editor or can you just use for example word pad?
I am not a developer but this seems easy enough to implement.
Please note that Word Pad is indeed a rich text editor.
You could also use Google Docs or Microsoft Word Online from your Microsoft account, if you have one.
Hope that answers it!
For example, if there is a submission error in a ticket form, does the re-displayed ticket form retain the value of the parameter before the error occurred?
If form submission fails, we try to retain the values at the time of submitting, not the pre-filled values in the URL. Because the user could have changed the pre-filled values.
@... I wrote some custom code for our help center literally the evening before seeing this article. While it was a waste of my own time (lol/sob) it may be helpful for you or anyone not using v2 of the help center.
Adding the below snippet will allow you to pre-fill fields using links like this:
Just swap 123 for your form ID, 456 and 789 for your custom ticket field IDs you want filled out, and tag1 and tag2 for the tags associated with the options you want selected for those fields. This format should work for any number of fields you wish to add, whether it's one or 10.
I wrote this specifically for drop-down custom fields, but you could likely adapt the script for other field types.
Anyways, here's the script you'd want to add to your new_request_page.hbs template:
For those new to jQuery, you should also make sure your page is set up to utilize jQuery by adding something like this:
Question about URL retention - if a user navigates around the HC before going back to the form, it looks like we lose the passthrough string - is this something you plan on addressing?
This is intentional. Pre-filled values based on URL parameters are specifically only in effect when those URL parameters are set. That way you can have different links pointing at the same form, pre-filling it in different ways.
I am trying to get this rolling and it seems like it's not possible if only one form is in use. My Help center only allows submissions at the following URL with no form ID.
Do we need to upgrade our account in order to utilize such a simple feature?
When pre-filling the forms with user information in GET request params, is there any recommended practices?
Is there risk in user information being leaked via parameters stored in server access logs? How does Zendesk handle server access logs in this case?
No upgrade is needed. You just modify your links. For example, here's a link to your form where it says Hello Garrett in the subject :-)
I would not recommend filling in any PII (personally identifiable information) into any URL. Simply because it's easy to copy-paste that URL and accidentally have your users accidentally leak the information that way. Side-note also that my gut reaction would be that it is better for you to store such information in the user object instead of the ticket, but of course use cases differ here.
As for our logs, please refer to our data deletion policy.
@... Is there any way to include a new line? Specifically, in the description field. I tried the following with no success:
Hey Alejandro, yes so it depends on whether or not you use a rich text editor or a plain text editor for the description field. If you use rich text, you should provide the HTML <br> tag, so you could have a parameter like
Thank you so much. I didn't even think of that even though I came up with a convoluted way of building the HTML paragraphs in the link. That is so much easier and makes more sense.
I think this would be a great thing to add to the article as I believe many people would like the ability to add new lines to the pre-filled ticket forms.
Thank you for the great feature.
But for some reason, it doesn't work for our case.
Could you help me?
Please sign in to leave a comment.