Zendesk Support search reference

Have more questions? Submit a request

205 Comments

  • Liqiong Bu
    Comment actions Permalink

    Raise the question. Can we do OR in query?

    0
  • Bryan - Community Manager
    Comment actions Permalink

    Hi Liqiong. I don't believe there's an ideal solution here for you. There's going to be some customized review/scripting of the data in tickets and then an action of some sort that suites your needs.

    OR operation is implied across the values using the same keyword. For example:
    tags:silver tags:bronze will look for tickets having tag:silver OR tag:bronze. Across different keywords, the implied operator is AND.

    The "via" keyword is to indicate the source of the ticket.

    You may have to do multiple passes to capture the exact records that you want. There is no one, ideal search phrase.

    Another consideration is to move through ticket record changes using the incremental API -- if this is an ongoing operation, you'll want to review the incremental ticket event export and pick up just the changes as they occur.

    0
  • Manish
    Comment actions Permalink

    Hello Anton de Young,

    I am trying to search tickets using group name as per the ticket search parameters described in this article. However, I am getting wrong results if I try to use group name as search query parameter. I am able to get correct result if I use group id instead. As per the current article we need to pass group name which is not working correctly. Please check if the article is updated as per API.

    0
  • Bryan - Community Manager
    Comment actions Permalink

    H Manish. When using the group keyword for search, the search request should look something like this:

    https://your_subdomain.zendesk.com/api/v2/search?query=group:"my groupname"

    Or the encoded form:

    https://your_subdomain.zendesk.com/api/v2/search?query=group:%22my%20groupname%22

    Can you share the search that uses the named version of the group?

    0
  • Manish
    Comment actions Permalink

    Hi Bryan - Community Manager,

    Below is the search which I am using:
    https://my_subdomain.zendesk.com/api/v2/search.json?query=type:ticket%20group:%22support%22

    I am getting tickets from group names support, support 1, support 2 etc.

    However, if I pass group Id instead of group name then I am getting correct result with the tickets which belong to the searched group id.

     

     

    0
  • Bryan - Community Manager
    Comment actions Permalink

    Hi Manish. I looked into this and confirmed this is as designed (but as in your case, maybe not as expected). You found the workaround in that providing a specific, numeric group ID, the search will be limited.

    This documentation was the closest I could find to clarify this behavior:

    ...you can search for "top" to list all users with the tag "top" or "top tier." The results will also include other data in Zendesk Support that match the string "top" as a single word, a single word in a longer phrase, or the prefix of a longer word

    I'm going to create a documentation change request, so that this is made clear when it comes to the group keyword and searching tickets. Thanks for raising this issue and your time to provide these details.

    0
  • Alex Rivando
    Comment actions Permalink

    Hi.. can I search for ticket that ever commented by specific author_id?

    0
  • Bryan - Community Manager
    Comment actions Permalink

    Hi Alex. You can use a user's ID or email address to return tickets that they commented on. Examples:
    https://your_subdomain.zendesk.com/api/v2/search?query=type:ticket cc:6717174888
    https://your_subdomain.zendesk.com/api/v2/search?query=type:ticket cc:john@example.com

    Does this get you want you need?

    0
  • Timothy Beutler
    Comment actions Permalink

    This section is wrong. It should not contain the second instance of the word "tags":

     

     

    It wasn't until I scrolled down further that I saw the proper way to use double quotes to create an AND Search with tags. Please fix! 

    0
  • Bryan - Community Manager
    Comment actions Permalink

    Apologies for the hassle but thank you for pointing that out Timothy Beutler - we'll get that fixed!

    0
  • Jesse Evans
    Comment actions Permalink

    I'm curious if there is an option that would allow me to search for tickets that have greater than 2 public agent replies.

    I'm trying to figure out which tickets are requiring the highest number of public replies, and I'm also not sure when I should tag and escalate a conversation to the Team Lead / Manager for further review. I've started to add a tag after 3 agent replies, but that is a guess at this point -- I'm struggling to leverage any of our existing tickets to dig in further.

    0
  • Peter Hochstrasser
    Comment actions Permalink

    Hi all 

    Quick question: Can I search for a string containing a non-character, non-digit sign, e.g. "#MyName"?

    I tried "#MyName" -" MyName" (Note the space) but that returned empty handed, while "#MyName" returned both Tickets containing #MyName and those just containing MyName.

    I also tried other non-alphabetic characters, all to no avail: % & @ ? |

    Only when I prefixed the MyName with an alphabetic character the search has been successful.

    Is that really a limitation?

    0
  • Bryan - Community Manager
    Comment actions Permalink

    Hi Peter Hochstrasser -- if you're using the Search API and since all characters get passed in the URL, you'll need to encode that particular character. Example: /api/v2/search?query=type:ticket %23MyName

    This is a handy site if you need to encode other characters: https://www.url-encode-decode.com/

    "reserved characters have to be encoded" -- ! * ' ( ) ; : @ & = + $ , / ? % # [ ]

    Which encoded are: %21 %2A %27 %28 %29 %3B %3A %40 %26 %3D %2B %24 %2C %2F %3F %25 %23 %5B %5D

    0
  • Peter Hochstrasser
    Comment actions Permalink

    Hi @Bryan

    I'm using the official ZEndesk client - search input into the browser's search entry line started by clicking the magnifying glass.

    Yours truly

    Peter

    0
  • Adam Browning
    Comment actions Permalink

    Dear Zendesk, 

    Is there a way to save a search to a view?
    I think a default view of all tickets you're cc'd on is something pretty basic for a centralize workflow tool.
    It doesn't make sense that we need to do a manual search over and over again.

    Thank you!

     

    1
  • Jon I.
    Comment actions Permalink

    Adam Browning I'd suggest Zendesk to enhance the search feature

    0
  • Greg - Community Manager
    Comment actions Permalink

    Hi Adam Browning! There is no method for this right now, but that is an interesting feature request and I'll share that with our product team. 

    For the time being, the easiest way to see the tickets that you're CC'd on is to click your profile icon in the upper right corner of the agent interface and click "View profile". In the middle of your profile view, you'll see a list of your assigned tickets. Just click on the drop-down where it current says "Assigned tickets" and then select "CCs" and you'll see them all!

    0
  • Ankur Bansal
    Comment actions Permalink

    Hi community,

    I am filtering my data using Seach API, by using the following query:-

    params = {
    'query': 'ticket_type:incident created>2020-03-07 status:closed',
    'sort_by': 'created_at',
    'sort_order': 'asc'
    }

    I also want to filter data with group id by doing something like; group id:"dcom sys admin" or "abc" or"".

     

    How can I do that?

     

    0
  • Bryan - Community Manager
    Comment actions Permalink

    Hi Ankur Bansal,

    There are two ways to include groups into a search:

    - Find tickets with group names that begin with a particular string by using the 'group' keyword and the beginning of the group name. Example:

    ticket_type:incident group:support

    This will find tickets belonging to any group that begins with "support".

    - You can also find tickets belonging to a specific group by passing that group's ID value (found via the /api/v2/groups.json API call). Example:

    ticket_type:incident group:360001679794

     

    0
  • Jonathan Kolodner
    Comment actions Permalink

    I'm having a hard time constructing a query that gives me:

    Tickets that I commented on, on X date. 

    If I use for example:
    commenter:me updated:2020-03-18 order_by:updated_at sort:desc

    I get tickets that I've commented on that have been updated on that date, but it doesn't limit to just my updates.

    What am I missing? 

    0
  • Bryan - Community Manager
    Comment actions Permalink

    Hi Jonathan Kolodner -- did you get this issue resolved? It doesn't look like there is anything wrong with that query.

    0
  • Peter Hochstrasser
    Comment actions Permalink

    Hi Jonathan Kolodner

    Tried this in my instance. It seems that you get all tickets 

    • that you commented (anytime) AND
    • that have been (last) updated on 2020-03-18

    IOW: You get what you search for, as Zendesk understands it - however, it is not what you intended to get.

    In my case, I got tickets that I commented on in January, but which have been updated on March 18.

    So,

    • commenter is not looking at just the last comment, it looks at all comments.
    • updated is always the last update; if a ticket has been updated on March 18th and later too, it won't be a match.

    You might have better luck with

         updater:me updated:2020-03-18

    but even that might not return what you had in mind - if somebody else made a comment on March 18th but after yours, it will not be matched.

    Hope this makes sense.

    Yours truly - Peter

    0
  • Bryan - Community Manager
    Comment actions Permalink

    I see now -- yes, that is as expected. It's looking at all comments and not tying the updated time to the commented (or even last comment) time -- just looking at them as separate items. Do you have a professional or enterprise plan? Sometimes these tougher corners of information gathering are better handled by product reporting.

    0
  • Jonathan Kolodner
    Comment actions Permalink

    Hi folks, thanks for chiming in and helping out!

    What I'm trying to achieve is to essentially get "snapshots" over time of updates performed by an agent (me, in this case) each day, and the status of the ticket at the time of that update. In addition to ticket status, would also like to visualize tickets relative to some custom field states as well (effectively another status dimension for our tickets). 

    What I'm having difficulty with in explore with regard to ticket queries is that things seem to want to pull from the current ticket status, and not the updates... and if I try to use the updates (even if filtering to ones with comment) it sees to produce a highly inflated count that I'm not sure how to properly filter down to relevant events (versus automations/macros etc... that might be getting included in that number.

    In short, I want "touches" per day, per ticket + how many tickets total were updated. Would also like the ability to break out all those tickets by status (open/pending/hold/solved/closed). It's looking like I will need to do some custom queries in Explore to make this happen, unless I'm missing something?

    0
  • Peter Hochstrasser
    Comment actions Permalink

    Hi Jonathan Kolodner

    Seems that we have some common "interests" here.

    One of our customers wanted to get a daily status including the last public comment.

    I ended up implementing this using the API and PowerShell - the result is an excel sheet that lists all open tickets of the support contract involved, and some simpler to collect fields.

    Problem is, getting this last public comment is, well, less than straightforward, and it is not a quick operation. This is why the normal query systems are unable to get those.

    In the meantime, we used Sparkly's Exporter plugin, and I asked them if they would incorporate functionality along these lines - answer has been yes, but the functionality is not yet there, I think. So, ask them if you are interested, otherwise the API is the only game in town.

    Yours - Peter 

    0

Please sign in to leave a comment.

Powered by Zendesk