How can we get number of users for particular location

Hi,

How can we get number of agents for particular location?

I am looking into API # /api/v2/locations/search to fetch agents mapped to a particular location.

In the API, We have parameter "expand", what are all the resources we can fetch?

Regards,
Vageesan

Hi Vageesan,

The possible values of expand are images and addressVerificationDetails.

So we cant expand users mapped or assigned to a location. Is that Correct?

Hello,

You can search for users using POST /api/v2/users/search and use a filter on the id of the location in your query.

The field to use for search on location id is: location.location.value.guid

As an example:

{
   "sortBy": "id",
   "pageSize": 25,
   "pageNumber": 1,
   "query": [
      {
         "fields": ["location.location.value.guid"],
         "value": "ID_OF_YOUR_LOCATION",
         "type": "EXACT"
      }
   ],
   "enforcePermissions": true
}

In expand, you can use: routingStatus, presence, conversationSummary, outOfOffice, geolocation, station, authorization, lasttokenissued, authorization.unusedRoles, team, profileSkills, certifications, locations, groups, skills, languages, languagePreference, employerInfo, biography
These are the same values than the ones supported for GET /api/v2/users/{userId}

Regards,

Thanks a lot. Can you share the link or document to learn more about "query" in search

There is unfortunately no document at this stage describing the support fields.
There is an opened action to have it documented. But I don't know when this will happen.
Some of these fields are mentioned in former posts on this forum.

Regards,

Thanks Jerome.

I will reach to the forum then :slight_smile:

Here are the ones I know:

"id": id of the user (userId)
"email": email of the user
"name": name of the user

"routingSkills": skill the user has (this one uses the skill name)
"languages": language the user has (uses language name)
"manager.id": id of the manager (userId of the manager)
"divisionId": id of division the user belongs to
"groups.official.guid" and "groups.social.guid": id of groups the user is a member of
"location.location.value.guid": id of location

And on other fields from contact/user details:
"department"
"profileSkills"
"certifications"
"addresses"
"primaryContactInfo"

Regards,

Thanks a lot for the information

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.