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:
Related articles:
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 editor.
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:
&tf_{title}={value}
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:
&tf_[fieldID}={value}
- Continue adding fields and values to the end of the URL in your text editor
as needed.
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.
System fields
The URL parameter of system fields uses the prefix tf_
followed
by the field name. For example tf_subject
. For more
information, see System ticket fields. Use the
following parameters for the Zendesk system fields:
-
Email:
tf_anonymous_requester_email
-
Priority: Include the value type (low, norm, high, urgent), after
the field name, for example
tf_priority=high
-
Type: Include the value type after the field name, for example
tf_type=incident
-
Description:
tf_description
-
Subject:
tf_subject
-
Due date: (Used when Type=task) Use the canonical date format
YYY-MM-DD, for example
tf_due_at
-
Cc: (Used when a user is logged in). Separate the emails with a
comma, not a space, for example
tf_collaborators=name1@example.com,name2@example.com
-
Organization ID: Include the value type after the field name, for
example
tf_organization_id=123456789
Custom fields
The URL parameter of custom fields uses the prefix tf_
followed
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
example
tf_40630945=dog_beagle
. - 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
89 Comments
Greeting Sam,
Thank you for your reply. Hope you are doing well today !
In order to make this work and pass multiple parameters in your URL, you will have to "encode" your URL.
Example :
should be encoded as :
I ran this test on my JWT SSO using the "return_to" parameter and this works like a charm!
and

See attached gif. (right click on it and "open in new tab" to see the gif in full size)
Hope this clarifies it! Have a great rest of your day.
Best regards,
@... 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.
DISCLAIMER: I am more of a JavaScript/jQuery hobbyist than a developer, so use at your own risk. :)
Adding the below snippet will allow you to pre-fill fields using links like this:
https://example.zendesk.com/hc/en-us/requests/new?ticket_form_id=123&fields=request_custom_fields_456,tag1|request_custom_fields_789,tag2
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:
Hi Team,
I love this feature! Question: will this also work with conditional fields which are not visible yet when the form is opened?
Thanks!
Bruce
I had been wanting this for a long time and randomly stumbled across this article saying that it's now available, which is awesome, so thanks for adding this feature!
However, please update the information above for Dropdown Menus (and/or Custom Fields) because this is not true:
I don't know what else this applies to, but I could not get this to work because I was using the "value" as mentioned in the article, when it really needs to be the "tag" in the URL, which can be totally different than the value.
In my case, I had the following:
So attempting to use the below URL did not work:
Changing the tag to "my_account_access" also didn't work because tags are forced lowercase, but my value was proper case.
It should also be noted that a hyphen can be used to separate words, so I could have "my-account-access" as the tag, and that would have been valid.
Finally, after paying a developer to check our code (and confirm nothing was wrong), the following worked:
So the article should state for dropdown menus (and maybe other field types), that it needs to...
Hopefully this helps someone else.
Hello,
We have enable the single sign-on connection, via JWT token.
When we access to a form with a prefilled ticket form, (like tf_123456=lopsem), if end user is already connected, it's working well.
However, if end user is not connected, after connection and redirect to the form url, the prefilled ticket form parameter disappeared from the form url
Exemple of workflow :
How can we keep tf_ parameter when end user is redirected after connection ?
Hi Sam! Something like this may be specific to your IdP, however this external article shows how you can use cookies, which might work for you. I'd recommend checking with your IdP to see how that data is handled and passed back to us after login.
Without having to create my own form and use the API, is it possible to set the value of a hidden custom field based on a url param? I'd like it to be a private/agent only field, but given the responses above, it seems unlikely. As a possible workaround, could I stick some custom js that sets the value and hides that particular field? I'm using the Copenhagen theme.
Any guidance would be most appreciated.
Thanks in advance!
Hi,
I'm trying to find a way to pre-fill a custom field with the customers organization name.
&tf_7511128378637=<???>
Would this be the a placeholder?
Hello Greg Katechis
The problem does not come from our LdP.
The problem comes from the connection url generated by Zendesk.
For example, on this page:
https://mywebsite.zendesk/hc/fr/requests/new?ticket_form_id=123456789&tf_subject=lorem%20ipsum
the connection url generated by Zendesk will be: "/hc/fr/signin?return_to=https%3A%2F%2Fmywebsite.zendesk.com%2Fhc%2Ffr%2Frequests%2Fnew%3Fticket_form_id%3D123456789"
The parameter "tf_subject" is not present.
Testing with an unknown parameter, like lorem_param=lorem ipsum, the parameter is well preserved.
For example, on this page: https://mywebsite.zendesk/hc/fr/requests/new?ticket_form_id=123456789&lorem_param=lorem%20ipsum
the connection url generated by Zendesk will be :
"/hc/fr/signin?return_to=https%3A%2F%2Fassistance.leboncoin.info%2Fhc%2Ffr%2Frequests%2Fnew%3Florem_param%3Dlorem%2520ipsum%26ticket_form_id%3D123456789"
Can you check why Zendesk does not generate a connection link with all the tf_ parameters?
Look at my comment above yours. It's...
Asger Andersen there'd be a "?" after the new normally iirc.
Example
https://wexervirtual.zendesk.com/hc/en-us/requests/new?&tf_subject=Request to delete user account
This isn't working though. Do you have multiple forms and can you confirm what version and theme you're on?
Is this after hitting the "edit code" option in the bottom right? If so, it may be worth speaking with the theme company.Asger Andersen
Hello Xiǎolín,
As long as the URL string is kept, if the page is reloaded, the values will be kept.
Hope that helps!
Asger Andersen no problem, I ran into the same issue.
You should see something like this against the theme when editing it.
Hello, I have a scenario where I couldn't get an answer about.
Scenario : The end user is connected on the help center and wants to submit a new request. There's a field where he must enter his contract number each time he submits a request.
Problem : How can we automatically fill the "Contract number" field for each request by an end user ( We can only get the information about the "Contract number" ticket field on the new page request from a user field called "CO" on our domain).
Thank you !
Hey @...! Let's say we have a ticket form (ID 1001) to collect information about donations. The form has the following fields:
If I wanted to create a pre-filled form where there was an anonymous $75.50 donation to the Local Food Pantry, here is how I would make the URL:
Can someone please help me with the code suppose I want auto-filled customer field then how to do for the following customer field, please provide example along with screenshot.
1.Drop-down menu
2.Checkbox
3. Decimal
Asger Andersen sorry, i should have been more specific.
This feature requires that your theme uses Templating API version 2. Do you know if the theme is using this version of the API?
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
Hi @...,
Yes it also works with conditional fields, even if they're not shown initially.
Thank you, Eric!.
Is there a plan to add this functionality to the feature?
Any idea how can I automatically update agent-only fields during/after a ticket was created from the help center contact support form?
Ran
For those having the same issue as Sam with `tf_*` query string parameters being removed from the `return_to` URL by Zendesk during the SSO flow, I asked the same question separately at the following URL and have also created a workaround which I've posted as a comment there:
https://support.zendesk.com/hc/en-us/community/posts/4703281675418-Pre-filling-ticket-forms-doesn-t-work-well-with-logged-out-users-and-SSO?page=1#community_comment_4762283979034
Thanks Matt Taylor; now I see it. We're on V1. That explains it. Thanks a lot for your help
@... Is there any way to include a new line? Specifically, in the description field. I tried the following with no success:
The dynamic content variant to be shown will be based on the user's language determined by the help center: Understanding how translated content is displayed in your help center
Hello,
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?
zendesk.com/hc/en-us/requests/new
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.
Hello.
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?
Hi,
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.
Thank you!
Please sign in to leave a comment.