I’m working on a cleanup script for our Genesys Cloud instance. We have a bunch of contractors who left, and I need to remove their user records via the API to keep the directory clean. The plan is to use the DELETE /api/v2/users/{id} endpoint.
The problem is I’m worried about the downstream effects on our historical data. When I delete a user, does the system actually remove the rows in the interactions table? Or does it just null out the userId field? I tried searching the documentation for data retention policies related to user deletion but didn’t find a clear answer.
Here is the code I’m using in C#:
var client = PlatformClientFactory.CreateClient();
var usersApi = client.UsersApi;
await usersApi.DeleteUserAsync(userId, expand: new List<string> { "groups", "skills" });
I saw a warning in the console output that mentioned “cascading deletes” but I’m not sure if that applies to interaction history. I need to make sure that when we run analytics reports for last quarter, the calls handled by these users still show up correctly and aren’t attributed to “Unknown” or just vanish completely.
Has anyone dealt with this? Is there a way to soft delete or archive the user instead? I don’t want to break our reporting pipeline.