Searching tickets Follow

all plans

Full text searches return results from all the data in Zendesk Support. To search exclusively for ticket data, you can use ticket property keywords.

status:open

In the example above, status is the keyword and open is the value. This search returns all the tickets with status set to open. This of course directly maps to the ticket fields and their values.

You can combine these keyword search statements to narrow your results even further.
status:open group:"Level 2"

This returns all the open tickets that are assigned to the Level 2 support group.

This article covers the following topics:

For a quick reference to all searchable data, see Zendesk Support search reference.

Ticket property keywords

The ticket property keywords and their values that you can use in your searches are described in the following table. Not all of the ticket data is searchable. Administrators and agents can search for tickets using these keywords.

Table 1. Searchable ticket properties
Keyword Description
Ticket ID
There isn't a property keyword for the ticket ID. Instead, you simply search for the ticket by its ID number in the following format:
233
created The date, or date and time, the ticket was created. Enter date in yyy-mm-dd format.
created:2011-05-01
Search within a date or time range. Enter times using ISO 8601 syntax. For example, to search for a ticket created between 10:30 a.m. and 12 p.m. (UTC) on August 1, 2014:
created>2014-08-01T10:30:00Z created<2014-08-01T12:00:00Z

For more information on using date and time in your search, see Searching by date and time.

updated The date of the most recent ticket update.
updated>2011-05-15

For more information on using date and time in your search, see Searching by date and time.

solved The date the ticket was set to solved.
solved<2011-06-01

For more information on using date and time in your search, see Searching by date and time.

due_date The due date of tickets.
due_date:2011-06-01

For more information on using date and time in your search, see Searching by date and time.

assignee The assigned agent or other entity. You can specify "none", "me", user name (full name or partial), email address, user ID, or phone number.
assignee:"Susan Warren"
submitter The ticket submitter. This may be different than the requester if the ticket was submitted by an agent on behalf of the requester. You can specify "none", "me", user name (full name or partial), email address, user ID, or phone number. See Searching ticket user roles.
submitter:me
requester The ticket requester. You can specify "none", "me", user name (full name or partial), email address, user ID, or phone number.
requester:amy@mondocam.com
subject The text in the ticket's subject.
subject:"upgrade account"
description The text in the ticket's description and comments.
description:defective
status Possible values: new, open, pending, hold, solved, closed.
status<closed
ticket_type Possible values: question, incident, problem, task.
ticket_type:problem
priority Possible values: low, normal, high, urgent.
priority>low
group The assigned agent's group name.
group:"Level 2"
organization The name or ID of the ticket requester's organization.
organization:customers
tags Tags that have been added to the ticket.
tags:premium

To find tickets that include either of two tags, use :

tags:important tags:urgent

To find tickets that include both tags:

tags:"important urgent"
via The ticket's source, which can be any of the following:
  • mail (from an email message)
  • get_satisfaction, get_sat, "get satisfaction" (from Get Satisfaction)
  • dropbox (from the Zendesk Feedback Tab)
  • chat (from Chat)
  • twitter_dm, "twitter dm", "twitter direct" (from a Twitter direct message)
  • twitter_fav, twitter_favorite, "twitter favorite" (from a Twitter favorite)
  • twitter_like, "twitter like" (from a Twitter like; alias of twitter_fav)
  • twitter (from any Twitter method including direct message and favorite)
  • voicemail (from a voicemail message)
  • phone_call_inbound (from an inbound phone call)
  • phone_call_outbound (from an outbound phone call)
  • phone (from voicemail, CTI, or an inbound call)
  • sms, text, "text message" (from a text message)
  • api (from API call or integrated web service)
  • logmein, logmein_rescue, "logmein rescue" (from LogMeIn)
  • facebook_post, "facebook post" (from a Facebook wall post to a page)
  • facebook_message, "facebook message" (from a Facebook private message to a page)
  • facebook (from any Facebook method including private message and wall post)
  • web, "web form" (from a web form)
via:phone
commenter People who have added comments to tickets. You can specify "none", "me", user name (full name or partial), email address, user ID, or phone number.
commenter:"Mike"
cc People who have been CC'd on tickets. You can specify "none", "me", user name (full name or partial), email address, user ID, or phone number.
cc:amanda@mondocam.com
fieldvalue

Search for a specific value in custom ticket fields by using the fieldvalue keyword. For example:

fieldvalue:12345

This returns all the tickets that have a custom field with the value "12345."

For drop-down custom fields, search based on the option's title. If you're using nested drop-down fields, search using the option's tag. For details, see Organizing drop-down list options.

brand Search for a specific Brand on a ticket. A Brand with two or more words requires quotation marks, while a one word brand can be searched as is. For example:
brand:Nordstrom
Or
brand: "Banana Republic"

All of the ticket property keywords can be used in search statements alone, in combination with other ticket property keywords, or with the type keyword (see Using the type keyword).

Searching ticket user roles

Users have various roles on tickets (requester, assignee, etc). These user roles can be searched by the user's ID, their name (partial or full), or their email address, as in these examples:

requester:52789480
submitter:amy
assignee:"amy moore"
requester:amy@mondocam.com

Notice that none of these searches required the ID, or name, or email to be explicitly declared. Each of these keywords accepts all of these user identifiers.

Searching custom ticket fields

You can search for a specific value in custom ticket fields by using the fieldvalue keyword. For example:

fieldvalue:12345

This returns all the tickets that have a custom field with the value "12345."

If your custom field assigns a tag to the ticket, you can also search for custom ticket fields using the tags that you assigned to the custom field. For example, if you created a drop-down list, you can search for the tags assigned to each list box item.

To search for specific drop-down list selections, you use the tags keyword.

tags:product_question

This applies to the custom field formats that be assigned tags: the drop-down list and the checkbox. The checkbox custom field can include a tag to indicate that the user has clicked the checkbox.

All of the other custom fields (text, multi-line text, numeric, decimal, regular expression) can be searched by the text or number values submitted by ticket requesters. For example, if you added a numeric custom field to the support request form to collect demographic information such as age, you can search for the numbers that the requesters entered in the form (type:ticket "18").

Searching for ticket attachments

You can use the following keywords when searching for ticket attachments.

Table 2. Ticket attachment keywords
Keyword Description
has_attachment You use this keyword to search for tickets that either do or not contain file attachments. There are two valid values for this keyword: true and false.
has_attachment:true
has_attachment:false
attachment_name You can also search for a file attachment by name.
attachment_name:image001.jpg

Searching for tickets with a specific ticket form

You can search for a ticket form and get results for all tickets where that ticket form is applied. For example, the following search returns all tickets that use the Change Request ticket form:

form:"Change Request"

Searching for tickets by telephone number

To locate a user's tickets based on their phone number, you can use a search statement like this:

requester:+14154187506 status:new

This works with all of the ticket user roles: submitter, requester, and assignee.

Searching for yourself

The me keyword value allows you to search user properties in tickets where the value is your own user account (as the currently logged in user).

assignee:me
This works for all the user role properties in tickets:
  • requester:me
  • submitter:me
  • assignee:me

For information about searching for user profile data, see Searching users.

Ordering and sorting ticket search results

Search results can be ordered and sorted using the order_by and sort keywords.

You need to use both of the keywords together in a search statement, as in this example:
status:new order_by:updated_at sort:asc

Here are the valid sorting and ordering keyword and value pairs that you can use:

  • sort:asc
  • sort:desc
  • order_by:priority
  • order_by:status
  • order_by:ticket_type
  • order_by:updated_at
  • order_by:created_at

All of the order_by and sort keyword/values pairs can be used when searching ticket data.

Have more questions? Submit a request

Comments

  • 0

    Hi Zendesk,

    How would I search for tickets where the ticket body contains multiple separate strings? For example, I'm looking for all tickets containing both "Facebook" and "pending." Is there anything equivalent to an AND operator?

    Also, how can I distinguish between public replies and internal notes when searching? From what I can tell, both are searched when you use "description." Am I missing something?

  • 0

    Hi Zach,

    This behavior will be a bit different depending on where you search, in the Agent interface or the Help Center. Searching in the agent interface should require 100% match for all terms of the search, so just putting "Facebook" and "pending" will be equivalent to and.

    For Help Center, you'd need to put the entire phrase in quotes in order to ensure they are searched, or else only some of the words will be required. If each individual word is in quotes, then results will still be returned that do not contain all of the words.

    Sincerely,
    James Peterson

  • 0
    Avatar
    Carlos

    How would I specify a word and a date created?

    For example: I want all tickets with the name Athena in the description created after 9/2/2015?

    I tried this but had no joy: /api/v2/search.json?query=description:athena&created>2015-09-02

    It just returned all tickets before and after with the word Athena

    Edited by Carlos
  • 0

    Hi Carlos,

    Have you tried /api/v2/search.json?query=athena&created>2015-09-02&type:ticket ?

  • 0

    I'd like to do a search for tickets that don't have either of two tags (Ex. Tag: "ABC" and Tag: "123"). Is there a way to isolate tickets that have neither of these tags?

  • 0
    Avatar
    Carlos

    Hey James,

    Didn't work :(

  • 0

    Hi Michael,

    I'm not familiar with any way to search 'not'; it is possible to make reports with Insights for tickets that do not contain certain tags. Perhaps that would work for you?

  • 0

    Hi James,

    I'm a starter user so I don't believe that option is available to me.

    Can anyone else confirm that this features doesn't exist, or is there a request somewhere that I can give a bump to?

  • 0

    I can confirm, based on responses from other Zendesk representatives, that there is no way to perform a "negative" search, or a search for items where a term does not appear. There is also no support for an "or" search, or items where any of multiple terms appear. This is pretty lazy search implementation in my opinion.

  • 0

    Hi Andrew,

    Thanks for confirming. Agreed, the current implementation appears to be very basic.

  • 0

    To clarify my previous statement, you can search for items that don't include a specific word or value by putting a minus symbol in front of the word in your search, but this will exclude tickets where these words appear anywhere. You can't restrict the exclusion to specific keywords or tags. So you could search for "-ABC -123" and presumably, you'd get all tickets which didn't contain either of those strings in any field, but if those are common words in the description of your tickets you would probably exclude a bunch of tickets that you don't intend to.

    Also, Zendesk does do an OR search when you specify two values with the same property keyword, but you can't do an OR search between two different keywords.

    Edited by Andrew Meyercord
  • 0

    I've got an interesting situation - I would like to search for tickets from submitters that come from a domain (eg: type:ticket submitter:*@example.com). I can't find any way to get even close to this - that kind of search (with or without the asterisk and also the at symbol) turns up nothing, and searching on plain "type:ticket example.com" i get a bazillion hits - because the dot is a word separator so I get all tickets with example as well as all tickets with the substring 'com' in them (lame that it finds 'community' when i search for com!)

    Anyone have any bright ideas around doing this? I resorted to the csv export of the ticket feed to find them, but that is a pretty gnarly workaround.

  • 0

    Hi Chris!

    The first thing that springs to mind is Organizations. You can set up your Orgs so that people from a specific domain are automatically added to a speciflc Org. Once that's set up, you'd be able to do a search just for that Organization and it'd pull up the tickets you're looking for.

    Do you think that would work for you?

  • 0

    Thanks, Jessie. Unfortunately many customers share the same domain, so we cannot auto-group them that way - hence my need to search for tickets as I mentioned. I spoke with Keith on your team and he suggested that it might be possible to do some work with tagging as tickets came in that fell into a "default org" for that domain so I'd be able to find them later and that may work for the future, but I really want to search for historical tickets rather than group new ones - this is usually in reaction to someone getting (manually) assigned to the wrong org from a domain and figuring out what collateral damage that may have happened before we figured that out.

    So, I guess, just add me to the list of people who wish your search worked a lot more thoroughly, or that we could create much more flexible views - eg "requester email matches *@example.com".

  • 0

    Hi Chris,

    If you do go the organization route, you can take advantage of the multi-org function (already enabled on your Zendesk) so that they can belong to that default domain-mapped org (in addition to whichever org(s) they are actually affiliated with). This allows you to do a full historical search by using the Organization filter along with whatever other criteria you want.

    It's still kind of a wonky workaround, though, so I certainly understand where you're coming from. I'd suggest contributing to the Product Feedback Community section about this:

    https://support.zendesk.com/hc/en-us/community/topics/200132066-Product-feedback

  • 0

    Hi guys,
    I have a question for you and I hope you can help me with this.
    How can I get tickets searching with a date range... I'm using the API. I did something like this: https://subdomain.zendesk.com/api/v2/search.json?query=created:2015-12-17&type:ticket but didn't works.... Anyone that can help me please?

    Edited by Arlene Salgado
  • 0

    Hi Arlene,
    If you are trying to fine all tickets created between 2015-12-17 and today, you should use created>2015-12-17 instead of created:2015-12-17. If that doesn't help, could you explain the results you are receiving and why they are not correct, ie not working?

  • 0

    Hi James,
    Thanks for you help, it works. Now I have another question, How can I get a date range, for example, tickets between 2015-12-17 and 2015-12-20?

  • 0

    Hi Arlene,

    In that case you just need to use two date filters, like this: created>2015-12-01 created<2015-12-21.

  • 0

    Thanks James.

  • 0

    Hi, 

     

    The search API only returns 100 items when request even if i set per_page parameter to 500. It would be great if some one can share your experience on how to get all the results in one single request. 

     

     

    Edited by Daniel Sagaya Raj
  • 0

    Hi Daniel,

    By default the max number of items that any endpoint will return is 100 items. You will have to paginate through the results in order to see the other results.

    You can find more info about this here: https://developer.zendesk.com/rest_api/docs/core/introduction#pagination

  • 0

    Hi All,

    We are interested in learning how you, Zendesk customers, use the Zendesk search in your work to help us continue enhancing and improving this feature.

    If you and your team are interested in sharing how search supports your work and are available for talking to us, please sign up using the form here. http://goo.gl/forms/IDuqGK20uu397YAb2

    We will follow up from there if we find a match to our study. Due to limited resource available, we may not be able to cover all customers. 

    Thanks!

  • 0

    Hi,

    1) Why not available organization:me and cc:me? (Searching for yourself)

    2) How to make value null -> fieldvalue:none?

    Edited by Sandro Alvares
  • 0

    I would like to get a list of Issue number, open, pending and closed, title of issue, on an specific country excluding all spam issues. Anyone could help me with that string?

  • 0

    Hi Sandro - the "me" search should work for all the user role properties in tickets. I tried "cc:me" and it returned a list of tickets. If that's not working for you please submit a ticket.

    I don't expect organization to work because you don't want to search for yourself as the organization, but your org's name. If you have a use-case for different behavior though, that's good feedback to share in the Feedback Forum.

    For searching null values, it would be good to know about your use case. For discussing that I would invite you into a ticket. You should get an email notification shortly.

  • 0
    Edited by Bob Novak
  • 0

    Hello Bob,

    1) About cc:me is why only work /api/v2/requests/ccd.json ? not exist search need use 2 ajax : /api/v2/search.json?query=type:ticket%20cc:'+userjson.id+'...  (look item2 example)

    2) Not exist organization:me is do need 2 ajax too and use /api/v2/users/me.json is get organization_id 

    $.ajax({url: '/api/v2/users/me.json', type: 'get'}).success(function(userjson) {
    $.ajax({url: '/api/v2/search.json?query=type:ticket%20organization:'+userjson.user.organization_id+'%20status<solved&sort_by=updated_at&sort_order=desc'}).success(function(json) {
    $.each(json.results, function(index) {
    console.log('Ticket: '+json.results[index].id+' - Status: '+json.results[index].status);
    });
    }).fail(function(e) { alert('Error:\n\n'+e);} );
    }).fail(function(e) { alert('Error:\n\n'+e);} );

    Too delay slow.

    Edited by Sandro Alvares
  • 0

    Hi Sandro - we're going to need to dig deeper into that, so let's discuss it in the ticket we have. Thanks!

Please sign in to leave a comment.

Powered by Zendesk