Searching tickets

Have more questions? Submit a request

53 Comments

  • Zach Hanes
    Comment actions Permalink

    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?

    1
  • Carlos
    Comment actions Permalink

    Hey James,

    Didn't work :(

    0
  • Liang Dai
    Comment actions Permalink

    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
  • Carlos
    Comment actions Permalink

    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

    0
  • Chris Mccraw
    Comment actions Permalink

    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
  • Christopher Gray
    Comment actions Permalink

    Would be nice if there were GUI tools in the UI to build complex search queries...

    0
  • Sam Inquieti
    Comment actions Permalink

    Hi,

    Would anyone have any examples of recipes for a report that would check missing phone numbers on our tickets?

    This would be from the initial set up of tickets and I need to identify the Assignee responsible too please.

    Any other recipes for reports that I can use to assess an incomplete ticket at a linked or child ticket level too please?

     

    Thanks

     

    Sam

     

    0
  • Jessie Schutz
    Comment actions Permalink

    Hi Sam! Welcome to the Community!

    What are you planning to do with this information? Do you need to have this information in a dashboard, or do you want to do more of an audit to ensure that tickets are being handled correctly?

    0
  • Sandro Alvares
    Comment actions Permalink

    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.

    0
  • Nicolas Escobar J.
    Comment actions Permalink

    Thanks Nicole.

    I do have another question. If I would like to get the number of public and private comments per user, what is the best way to do it via the API? 

    In the tickets, I only see the if there are public or private comments and the number of comment counts (with side loading) but it's not possible to know how many are public and how many are private.

    I could use GET /api/v2/tickets/{ticket_id}/comments.json but I have to get this for each of the different tickets which will probably take a long time.

    Is there a better way of doing this?

    0
  • James Peterson
    Comment actions Permalink

    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
  • kampstand
    Comment actions Permalink

    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
  • Alex Greenberg
    Comment actions Permalink

    Hi, what's the best way to find all tickets that used a particular macro?

    0
  • James Peterson
    Comment actions Permalink

    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
  • James Peterson
    Comment actions Permalink

    Hi Carlos,

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

    0
  • Arlene Salgado
    Comment actions Permalink

    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?

    0
  • John Desu
    Comment actions Permalink

    What's the recommended method of searching for tickets solved by an agent, within a given time-frame?

    0
  • Nicolas Escobar J.
    Comment actions Permalink

    Hello,

    How do I search for Ticket IDs that are bigger than a specific ID?

    For example, I want all tickets > ID.

    I've tried /api/v2/search.json?query=id>1892069 type:ticket but it only returns that ID.

    Thanks,
    Nicolas

    0
  • Michael
    Comment actions Permalink

    Hi Andrew,

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

    0
  • Arlene Salgado
    Comment actions Permalink

    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
  • Jessie Schutz
    Comment actions Permalink

    Thanks for sharing your feedback, Crystal!

    0
  • Crystal Eidson
    Comment actions Permalink

    Hi Zendesk - I have a request for the advanced ticket search field. I would like to be able to use Boolean operators, at least to a limited extent. For example, if I'm researching reports of crashes in our Android app, I'd like to search for tickets tagged "crash" but NOT those which are also tagged "iOS". In order to see these kinds of details, I would need to open each individual ticket, since the preview shown on mouse-over doesn't always clue me in. And trying to do the same search through the Tags screen is even more time-consuming.

    Many thanks!

    0
  • Brett - Community Manager
    Comment actions Permalink

    Hi Raul,

    If you'd like to search for tickets by the custom date field you've set up you should be able to use "fieldvalue:2019-01-16" and replace 2019-01-16 with the date you'd like to search for.

    Could you test this to see if that gets you the results you're looking for?

    0
  • James Peterson
    Comment actions Permalink

    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
  • Bob Novak
    Comment actions Permalink

    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
  • Jessie Schutz
    Comment actions Permalink

    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
  • Nicole - Community Manager
    Comment actions Permalink

    Hi Nicolas -

    There's not a way to search by ticket ID "greater than" as you're asking. However, if what you're trying to do is look for all tickets created after a specific one, you could determine the date that specific one was created and then run a search for tickets newer than that one and it would effectively return the same results as ticket IDs greater than that one. Let me know if that solves the issue for you or if you have additional questions!

    0
  • Jessie Schutz
    Comment actions Permalink

    Hey Jason!

    When you use a dropdown field, the option selected adds a tag to the ticket. So you can just search for the tag associated with that "Bug" selection.

    0
  • Raul Winslow
    Comment actions Permalink

    Hey Brett,

    I appreciate your response. I am aware of this query, however, as I mentioned, I’m attempting to sort by the value of a custom field, not search by it. In the search API articles, I couldn’t find if this was possible.

    Thank you

    0
  • Nicole - Community Manager
    Comment actions Permalink

    Hey John - 

    Apologies for the delayed response. What you'll need to do here is build a report; there's no search capability that will show this, exactly. 

    Do you know what plan level you're on? It may impact what data you have access to... 

    0

Please sign in to leave a comment.

Powered by Zendesk