Searching users, groups, and organizations

Return to top
Have more questions? Submit a request

51 Comments

  • Senthil Ponnusamy

    Hi,

     

    Do we have an  option in API  to  search a user based on  his last_login_at(last sign-in)

    in  my requirement i need to get a list of users created >50 days and last_login<60 days

    I manage to get to created  > 50 , but not able to search for any conditions related to last login .

     

    0
  • Brett Bowser
    Zendesk Community Team

    Hey Senthil,

    You can't do a search for these users using the API, however, you can make an API call to the Users endpoint and parse the returned information using some custom script. I've attached some additional information regarding the users endpoint for you as well.

    Hope this helps!

    0
  • Senthil Ponnusamy

    thanks Brett for clarifying 

    0
  • Farhad Fatemi

    Hi,

    There seems to be a bug with the user search API when searching users using a query for phone numbers. When searching a user using the phone number the email field returns null. Searching for the same user using the email or the username returns the email value.

    Is this how it's supposed to be or is it a known bug?

    Endpoint: /api/v2/users/search.json

    Result with a phone query: /api/v2/users/search.json?query={{phoneNumber}}

    "email": null,

    Result with a username query: /api/v2/users/search.json?query={{userName}}

    "email": "{{email}}",

    The user ID's return is the same, so there is no chance that a different user is presented.

    Thank you,
    Farre

    0
  • Pedro Rodrigues

    Are there any plans as to when will search abilities under /agent/admin/people be improved?

    Eg. If I have 10 Groups named "XX - Help Center" where "XX" is a country code, I'd love to be able to find them all just by searching "Help Center". But since Zendesk seems to execute an absolute match search from left to right, and it doesn't allow for wildcards, it's really time consuming...

    0
  • Brett Bowser
    Zendesk Community Team

    Hi Pedro,

    I reached out to our team internally and they are looking to make improvements with the search functionality within the coming year. It sounds like what you're looking for may be possible we don't have an ETA of when this could be implemented if at all.

    Do know that your feedback has been passed along to the appropriate team and if we have additional questions we will follow-up here :)

    Cheers!

    0
  • Jason Kadlec

    Can I search two custom user fields, where in one field I want to find a value, and the second field I want to find has NOT the value:

     

    custom_field1:foo

    !custom_field2:bar 

     

    ^ find all users that have the value foo in custom_field1 and do NOT have the value bar in custom_field2 

     

     

    0
  • Brett Bowser
    Zendesk Community Team

    Hey Jason,

    You should be able to use the following:

    field_name_1:platinum -field_name_2:gold

    Let us know if that doesn't work :)

    0
  • Alex Pereira

    Hi,

    Is there a way to search for Organizations that do not have any tickets? Or get Ticket counts with the Organization?

    For context: We have a custom made sync program between our internal CRM and Zendesk, and throughout the years, we have changed which category of clients get setup in Zendesk, and we have a need to do a clean-up... it's a few thousand organizations, so I am trying to figure out how to better do this. 

    So far, what we could come up with is running a report in Good Data, adding Organization Tickets (I think this is the name of the field that gives you the ticket count), downloading that, and feeding that into our cleanup program. I am trying to avoid having to do this manual work...

    Thanks!

     

     

    0
  • Brett Bowser
    Zendesk Community Team

    Hey Alex,

    Most likely using GoodData will be your easiest option here and typically the one that I recommend first.

    The other option would be to use our Zendesk API and create a script that searches for organizations with 0 tickets associated with them. 

    I also recommend taking a look at the available export options listed in the following article:Ticket Export Options

    Apologies for not being able to provide another alternative for you at this time :-/

    Let me know if you have any other questions!

    0
  • Alex Pereira

    Hi Brett,

    Thanks for the response. I am familiar with the API (I created our "sync" program using it), but I am not sure how to search for organizations with 0 tickets associated with them. Could you show me the query for it?

    I can see any field in the Organization's object that would give me that:

    https://developer.zendesk.com/rest_api/docs/support/organizations#organizations

     

    Thanks Again!

    0
  • Brett Bowser
    Zendesk Community Team

    Hi Alex,

    My knowledge with the API is rather limited so I'm not exactly sure what that query would be. I reached out to one of our API experts and they mentioned you could use the List Organizations endpoint which I've linked.

    You would then need to use Incremental Tickets with a start time of zero, and use the count listed there.

    I hope this points you in the right direction!

    0
  • Alex Pereira

    Thanks Brett!

    0
  • Brett Bowser
    Zendesk Community Team

    Happy to help Alex :)

    0
  • Jo Kvalvaag

    I have trouble searching organization names and custom organization fields: If searching for an organization with multiple words in its title, it will only make a hit if we input the name correctly from the first letter. 

    Likewise, if you create a new user on a ticket, the field for associating the user to an organization has limited search capabilities, and requires us to input the name exactly. 

    We have a custom field, alias, as organization field because a lot of our customers do not use their officially registered business names. We are unable to search this field at all even when using "alias: namepart"

    We have Norwegian localization. 

    Search seems to work just fine and as expected on user names.

    0
  • Brett Bowser
    Zendesk Community Team

    Hey Jo,

    This seems like a bug so we will want to do some troubleshooting in your account to see if we can replicate. I'm going to generate a ticket on your behalf so we can look into this with you.

    You'll receive an email shortly stating your ticket has been created.

    Cheers!

    0
  • Nabeel Bilgrami

    Hi Anton,

    Can you please update the article that Suspended users can be searched? Suspended users can now be searched/filtered by property is is_suspended:true (or false). This information is already provided in following article: https://support.zendesk.com/hc/en-us/articles/360022175334-Release-notes-through-2018-08-11

    0
  • Nicole S.
    Zendesk Community Team

    Thank you for that suggestion, Nabeel. I've asked our documentation team to look into this.

    0
  • Aimee Spanier
    Zendesk Documentation Team

    Hi, Nabeel. Thanks for catching that! The table has been updated to include a couple missing items, including suspended user search.

    0
  • Serhii Dolhopolov

    Hi,

    Is there a way to search Organization that do not have external_id. For instance, we should find organizations available for binding with the external system.

    I suppose the search request should be like this:
    type:organization external_id:none

    But according to organization property keyword, there is not 'external_id' keyword in the list https://support.zendesk.com/hc/en-us/articles/203663226#topic_gok_ffv_uc

    Could you please give me a piece of advice or some solution on how to make it?

    0
  • Elissa
    Zendesk Community Team

    Hello Serhii Dolhopolov

    There is not a way to use the support search bar to identify which organizations have an external_id. But, you could use the organizations API endpoint which has an external_id attribute. See more information on that here: https://developer.zendesk.com/rest_api/docs/support/organizations. You would have to scroll through or write a script to pull out all organizations that have an external_id of "null".

    I hope that helps!

    0

Please sign in to leave a comment.

Powered by Zendesk