User Retention
🎯 Functional documentation
The user removal scheduled provider tries to remove inactive users from the Harmoney system. The provider is executed every day by default.
The provider is a shared provider and cannot be removed. If the provider was somehow deleted, it will be automatically added again with the default settings! The user removal scheduled provider is not meant to be configured on organization level, because users in Harmoney are not linked to an organization.
To qualify as an inactive user, the following conditions must be met:
- The user has not been updated in any way for a configurable amount of time. This "inactivity threshold" is 2 years by default.
- The user's most recent user session must also be older than the inactivity threshold.
- The user is not currently linked to any other data. This includes:
- Any FSP related data (dossiers, parties, documents, due diligence checks, questionnaire answers, etc.)
- Any user roles linked to the user (only the
INVESTORrole will not block the removal) - Any archive records
The inactivity threshold can be changed in the user removal provider settings. Note that you have to configure the threshold as a relative datetime.
The removal of inactive users will be performed asynchronously in a separate transaction per user.
Users that could not be removed (most likely due to a foreign key constraint violation) will have a remove_after date set and the provider will only attempt to remove the user again until after this "remove after" date.
By default, the time between removal attempts is at most 14 days. This can be changed in the provider settings (setting backoff). Removals are delayed by a random number of days between 0 and the configured backoff value to avoid spikes in removal attempts.
⚙️ Configuration
Optional parameters
CRON_SCHEDULE: Determines the periodic interval to run the provider. When not provided, the provider will not be executed.batchSize: The maximum number of users that are removed in a single batch. Default is1000. Maximum 1000 batches are executed on a single provider execution, resulting in at most one million user removals.inactiveThreshold: Define a threshold. Users whose last activity was before this threshold must be removed. Default is< -2y.backoff: Define a maximum number of days for the provider to wait after an unsuccessful removal attempt before retrying the removal again. Default is14days.verbose: Enables more logging onINFOlevel with details on why users could not be deleted. Defaultfalse.