Deleting users via SDK without losing interaction history

Running into an issue where deleting a user via the JS SDK (genesys-cloud.platformApi.usersApi.deleteUser) seems to wipe their historical interaction data in the dashboard. Is there a specific flag or separate API call to archive interactions before deletion? The docs mention soft deletes, but the type definitions don’t expose an option for it. Here’s the snippet I’m using:

const res = await usersApi.deleteUser(userId, { force: true });

Any idea how to preserve the data?

Maybe try archiving first. Deleting users usually keeps data, but if you see gaps, check the deleteUser options.

const res = await usersApi.deleteUser(userId, true); // true for soft delete

Verify the interactions are still in the raw data view. Sometimes the dashboard cache lags.