Searching users, groups, and organizations

Searching users, groups, and organizations

Data in the user, group, and organization objects can be searched. Searching these objects returns user profiles and group and organization summary pages; each of which also lists any associated tickets.

You can search users, organizations, and groups by using the search tool that is displayed in the People page.

When you search from this page the results are restricted to this people data.

If you search using the global search tool, you need to also use the type keyword if you want to restrict results to specific types of data. If you don't, your search results will include matches from the data in your Zendesk.

type:organization tags:premium

The user data properties that can be searched are described in the tables below. All of the searchable data in your Zendesk (including ticket data) is described in Zendesk search reference.

The user and type keywords

To search for a user's profile data, you have the following two options.

Using the user keyword:
user:amy
Or, using the type:user keyword:
type:user amy
What's the difference between the two? The keyword user when not combined with type is just a shortcut for finding users by ID, name, and email address. The user keyword, like the ticket user role keywords (assignee, requester, submitter), accepts the ID, name, and email address as valid user identifiers.
user:52789480
user:amy
user:"amy moore"
user:amy@mondocam.com
If you want to search for additional user data, such as the user's phone number, the organization they belong to, and so on, you need to use type:user.
type:user tags:beta_user organization:customers

This example also illustrates the usefulness of type keyword. With it you can search for user data that is shared by more than one user. You can search for users that are in the same organization or group or any of the other searchable user data. For more information about the type keyword, see Using the type keyword.

The type keyword is also used to search the group and organization data objects.
type:group name:"level 2"
type:organization name:customers

Searching users

The user data object contains all of the user properties that you can set in the user profile. Not all of the user profile data is searchable; those properties that are searchable are described in the following table.

Note: You can't currently search for users by their role.
Table 1. User property keywords
Keyword Description
name The user's partial or full name.
type:user name:"alex anderson"
email The user's email address.
type:user email:alex@mondocam.com

You can search for all users in an email domain. See Searching for users by email domain.

group The user's group name. This only applies to admin and agent users.
type:user group:"Level 2"
organization The user's organization name.
type:user organization:mondocam
created The date the user was added to your Zendesk.
type:user created<2011-05-01
notes All text in the notes field in the user's profile.
type:user notes:"manager"
details All text in the details field in the user's profile.
type:user details:"madison, wi"
external_id The user's external ID, if used.
type:user external_id:0098884412
phone The user's phone number. You must search for the number exactly as it was originally entered into the user's account.
type:user phone:555-111-2222
tags Tags that have been added to the user's profile.
type:user tags:premium tags:wholesale
For more information about tagging users and organizations, seeAdding tags to users and organizations.

Searching for users by email domain

All users belonging to the same email domain can be returned with this search statement:
type:user mondocam.com
To search for more than one email domain at a time, you just add more email domains to the search:
type:user mondocam.com zendesk.com

Searching for users by custom fields

Searching groups

Here are the group properties that can be searched.

Table 2. Group property keywords
Keyword Description
name The group's name.
type:group name:"level 2"
created The date the group was added.
type:group created<2011-05-01

Searching organizations

Here are the organization properties that can be searched.

Table 3. Organization property keywords
Keyword Description
name The user's partial or full name.
type:organization name:mondocam
created The date the organization was added.
type:organization created<2011-05-01
notes All text in the notes field in the user's profile.
type:organization notes:EMEA
details All text in the details field in the user's profile. type:user details:information
type:organization details:london
tags Tags that have been added to the organization.
type:organization tags:premium

For more information about tagging users and organizations, see Adding tags to users and organizations.

Have more questions? Submit a request

Comments

  • Avatar
    Tom Fennelly

    Hi Anton.  Thanks for the article.  Is it possible to search users by "role" i.e. search for all users with the role of "Agent" or "Administrator" (or maybe user NOT "End-user")?

  • Avatar
    Tom Fennelly

    I should clarify... I'm asking specifically about the possibility of doing this through the REST API.

  • Avatar
    Jay WS Chung

    I want to add some comments on this. I used your "Zendesk API" page to test out some of REST API calls. I used "Search" method to search the users. However, it always returns all users. Is there any way I can search a user using "email" so I can update the user?

  • Avatar
  • Avatar
    Jay WS Chung

    Thanks for following up. Yap. I already figured it out. I had to use query=user_email.

  • Avatar
    Justin

    Excellent, thanks! 

  • Avatar
    Jay WS Chung

    I can't seem to search Organization / Group by 'name'. What is the syntax of it? I used same syntax as user search.

    ex 1) groups.search({:query => "test"}).fetch / organizations.search({:query => "test"}).fetch

    ex 1) groups.search({:name => "test"}).fetch / organizations.search({:name => "test"}).fetch

    Both do not work. Is there any document that we can use it to figure it out this kind of syntax issue?

  • Avatar
    Justin

    Where are you using that syntax? Are you utilizing the API? http://developer.zendesk.com/documentation/rest\_api/search.html

    See a full list of search keywords here: https://support.zendesk.com/entries/20239737-zendesk-search-reference

  • Avatar
    Frankwin Hooglander

    How can I search for users that are (not) suspended?

    We get quite a lot of spam, so those users get suspended, which is good, but then I want to be able to search for users that have no organization set, but that aren't suspended so I can get the organization set. I know to use "organization:none" to do the first part, but not how I can then only find those users that aren't suspended. Any help would be appreciated.

  • Avatar
    Khoa Le

    @Frankwin

    This will only be possible via the API. You can perform a search for users with no organizations that aren't suspended, and generate a list of those users. From there. For more information on our rest API, feel free to refer to this article:

    http://developer.zendesk.com/documentation/rest\_api/users.html

  • Avatar
    Frankwin Hooglander

    @Khao

    The API documentation doesn't show a "suspended" attribute for an end-user either. Only for agents/admins.

  • Avatar
    Khoa Le

    @Frankwin

    The suspended attribute is available for end-users. The field will only show up if an agent or admin makes the API call. An end-user doesn't have access to all the information an agent or admin does, so they won't be able to see all the attributes.

    Hope that clears things up for you.

  • Avatar
    Maxime Lesbros

    Hi,

    We can't seach organisations by domain name ?

  • Avatar
    Dan B.

    Hi Maxime,

    Light Agents can search for tickets by organisation domain name via the search functionality in Zendesk. However, if you are a light agent, you won't have the ability to search users or organisations for the purpose of managing their accounts.

    Hope that helps!

  • Avatar
    Ann Cool

    I have 3 active users that have the word cool in their name and in their email address : 1 administrator (I'm logged in with this account) & 2 end-users.

    When I search on the text "cool" (people, any time) in the search-section, I only get the info of the administrator.

    I also tried "type: user cool" but still get only 1 result : the administrator

    I even removed the link from the 2 users with their organisation and did my select again, but still the 2 end-users are not found.

     

    When I search the text "cool" in the people-section of admin-part of the website, the 3 users are found.

     

    Do you know why I get different results for the same search-command? Has the search from the left banner other options than the search via the admin-part?

  • Avatar
    Matthew Dunn

    @Ann

    What you're seeing here is that we are currently using two different types of search logic for the Global Search vs. the Admin -> People search.  In the global search, Zendesk is looking for the text "cool" at the beginning of a first name, last name, or email address.  The Admin-> People search is looking for "cool" even if its in the middle of a name/email address.  The exception here is that the Global search does look at the middle of names when there is capitalization in the middle of a first or last name.  For example, if you were to search for "don" you should get results for users with the last name "MacDonald".  

    This is working as expected currently, but we are working on improvements to the Global search which should help with your searches in the future.

    I hope this was helpful in answering your question.

  • Avatar
    Seth Wylie

    Is there a way to search for 'null'? We are supposed to always have the Details section of an Organization with their Account Number, but we just realized that one of our reps has been skipping that step :-( So I want to go back and see which orgs need to be fixed...

  • Avatar
    Jessie Schutz

    @Seth, unfortunately there isn't a way to search for this information in Zendesk natively, but you should be able to pull the information using the API. You can find more information about that here: http://developer.zendesk.com/documentation/rest\_api/organizations.html

    I hope that helps!

  • Avatar
    Scott Brown

    Is there a way to search thru notes for a specific company (or multiple companies) for a word or string of words.  As example - I want to see all tickets related to my Customer XYZ that have the word license in notes.

     

    I tried:

    type: Organization name:customer name notes:license - - that didn't work

     

  • Avatar
    Arthur Mori

    Hi Scott,

    Allow me to create a ticket on your behalf, i think i need more information to understand your request. I'll assist you on that ticket.

  • Avatar
    Jeff Zabel

    Is there a way to search for all users who have ever submitted a ticket? I have a lot of users, but only want to find the users who have ever filed a ticket.

  • Avatar
    Emily

    Hi Jeff,

    I see you submitted a support ticket on this question and received your answer. Since I've seen this question come up before, I figured I'd reiterate the answer here: Our Search function cannot check the user database against the ticket database to find users who have x amount of tickets. Our Insights integration with Gooddata does allow you to build a report that searches users who have submitted at least one ticket.

  • Avatar
    MiiiA Pty Ltd

    Further to Jeff's query above, in my situation I was keen to be able to search for:

    any USERS that have NO TICKETS

    We setup users manually and I want to be able to purge/clean these users up once in a while. Seeing as though this is not possible via the web-client, is it possible via the API?

Please sign in to leave a comment.