Retention Periods
AI-Public offers the ability to set retention periods per collection. A collection is a set of similar data. For example, there is a "Organizations" collection and a "Chats" collection.
For some collections, this option is not available. This is the case for data where it is not logical for them to automatically expire after an end date, or where other legal retention periods apply.
Setting Retention Periods
The organization_admin can set retention periods in the environment, under the "Data retention" section.
Default periods are already set, but these can be modified per environment. Examples of settable periods:
- project data, chats, and chat messages will be deleted after X months
- team or project group data will be deleted annually or after project completion
- user and employee data will be deleted X years after end of employment/contract, in accordance with GDPR and company policy
How Data Retention Works
When adding a new record to the collection, an automatic expiration date is calculated immediately based on the Data retention settings.
For example, a chat is added on April 18, 2024, and the data retention is set to 3 months. The record will then be assigned an expiration date of July 18, 2024.
We use the Firebase TTL policy functionality. Firebase detects the expiration date field and automatically cleans up records that are past their expiration date. This happens approximately 24 hours after the expiration date.