There is an API to get the user state with the reason (stateChangeReason) selected when deactivating or deleting the user.
However there is currently an issue with the API
GET/api/v2/users/{userId}/state as it returns an error message about a missing permission [directory:userStateChange:view]
The indicated permission (
directory:userStateChange:view) does however not exist and cannot be selected or assigned to any role. I tried this unsuccessfully on multiple organizations and ended up logging a case with Genesys support. It seems that the rollout of the additional permission wasn't applied successfully and this may be different by region (I tried 2 orgs on 2 regions).
Anyone was successful in using this API
GET/api/v2/users/{userId}/state?(if yes, pls indicate the location of your org)
@Jennifer: With regards to editing the state reasons, this is not possible as the valid values are clearly documented by Genesys (https://developer.genesys.cloud/api/rest/v2/users/#put-api-v2-users--userId--state ) as follows:
state: Valid values: active, inactive, deleted.
stateChangeReason: Valid values: Voluntary, Seasonal, Leave, Performance, Conduct, Unknown.I tried updating a user using the state API with a Custom reason to prove this is not possible and get the following result: "Value [Custom Reason] is not valid for field type [StateChangeReason]. Allowable values are: Voluntary, Seasonal, Leave, Performance, Conduct, Unknown"
@Tracy: Not sure the state reason you mentioned (https://help.mypurecloud.com/articles/change-state-action/) is really pertaining to the same subject though. It is rather related to tasks and not to the agent attrition reasons as expected to be returned by the state API
------------------------------
Hichem AGREBI
hichem.agrebi@cc-expertise.comCC-Expertise Ltd
------------------------------
Original Message:
Sent: 12-28-2021 06:07
From: Tracy Vickers
Subject: Did you know.....you can Track Agent Attrition?
Hi Jennifer,
The link below may answer your question for reporting:
How do active, inactive, and deleted users affect reports and performance views? - Genesys Cloud Resource Center (mypurecloud.com)
Regarding the change state reason - does this answer your question?:
Change State action- Genesys Cloud Resource Center (mypurecloud.com)
Hope that helps
------------------------------
Tracy
Genesys
------------------------------
Original Message:
Sent: 12-27-2021 13:41
From: Jennifer Springs
Subject: Did you know.....you can Track Agent Attrition?
Also, how can we access this information to track it? Is there a report or do we need an API?
------------------------------
Jennifer Springs
Maximus, Inc.