Hey everyone,
I’m trying to clean up our user roster in Genesys Cloud but I’m hitting a bit of a snag. We have a batch of former agents who need to be removed from the active directory, but I can’t just let their records sit there forever.
The problem is the DELETE /api/v2/users/{userId} endpoint. When I call it, the user is gone. Poof. And while that’s technically what I asked for, it seems to decouple or orphan a ton of historical interaction data. If I pull conversation logs from six months ago, the agent name is just “Unknown” or a raw GUID instead of the person’s name. That’s a no-go for our reporting team.
I’ve been digging through the docs and I know there’s a “soft delete” or archive concept, but I can’t find a specific API call that archives a user while keeping their name attached to past interactions. Is there a specific payload I need to send, or am I just using the wrong endpoint?
Here’s what I’m currently running in Python:
response = client.users_api.delete_user(user_id=user_id)
print(f"Status: {response.status_code}")
It returns a 204 No Content, which is expected, but the side effects on the data warehouse view are messy. I tried setting the user to “inactive” via a PUT request, but that doesn’t actually remove them from the active user list for provisioning purposes.
{
"status": "inactive"
}
Anyone have a trick for this? I basically want to hide them from current routing and login capabilities but keep their identity intact for historical queries.
Thanks!