Kyle_Ross | 2017-11-01 16:39:31 UTC | #1
I am searching for a list of users along with their current presence. For some users I get their actual presence, but for others the presence name (user.Presence.PresenceDefinition.SystemPresence) is null. The Presence.PresenceDefinition.Id is not null and when I get the presence with the presence api I get a SystemPresence that is correct. Am I doing something wrong here or do I need to go out and get each presence and attach that to each user instead of expanding the presence?
I use the following to search for users:
UsersApi usersApi = new UsersApi(); List<User> users = new List<User>(); var body = new UserSearchRequest() { PageNumber = 0, PageSize = 25, SortBy = "name", SortOrder = UserSearchRequest.SortOrderEnum.Asc, Expand = new List<string>() { "presence" }, Query = new List<UserSearchCriteria>() { new UserSearchCriteria(Type: UserSearchCriteria.TypeEnum.Contains) { Fields = new List<string>() { "name" }, Value = searchTerm } } }; UsersSearchResponse result; do { result = usersApi.PostUsersSearch(body); users.AddRange(result.Results); body.PageNumber += 1; } while (result.PageNumber < result.PageCount);
tim.smith | 2017-11-01 17:48:35 UTC | #2
Can you provide the correlation ID from a response where you're missing some presences and identify a user id that is missing presence?
Kyle_Ross | 2017-11-01 18:01:51 UTC | #3
The correlation ID is 68bf5bd0-652b-4b0d-8f4e-fc36ba1dfb9c and a user ID that is missing the presence is f923c4e6-820f-49ef-a89d-33d2359b88de.
tim.smith | 2017-11-01 18:35:18 UTC | #4
Thanks. I see traces indicating that the presence information was retrieved for that user. There aren't any errors that I can see in the logs, so it appears there's a bug or some other issue that's causing this. Please open a ticket with PureCloud support as it appears you are doing everything correctly and that this is a missing data issue that cannot be investigated via the forum.
system | 2017-12-02 18:35:30 UTC | #5
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 2048