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.
Original Message:
Sent: 12-21-2021 04:33
From: Tracy Vickers
Subject: Did you know.....you can Track Agent Attrition?
Yes, you can :-)
You can set the status of one or more users to inactive or deleted. Typically, use inactive status for seasonal workers, or for employees on extended leave of absence who plan to return to the organization. You can also track agent attrition when you delete users or set their status as inactive. Use the captured data to understand why some agents turn over faster than others, and to map out the employee journey.
- Click Admin.
- Under People and Permissions, click People.
- Select the users whose status you want to change.
- To delete a user, do one of the following:
- Click Set State and from the menu that appears, select Deleted.
- Click the name of the user you want to delete and on the Role tab click Delete Person.
- To delete multiple users, do the following:
- Select the users to delete.
- Click Set State and from the menu that appears, click Deleted.
- To set user status as inactive, click Inactive.
Note: Inactive users cannot log into the organization.
- In the Confirm State Change dialog, select the reason for the status change:
- Voluntary
- Seasonal
- Leave
- Performance
- Conduct
- Unknown
- Click Save.
#WorkforceManagement
------------------------------
Tracy
Genesys
------------------------------