Record retention policies
Unblu stores various types of data about conversations, such as the participants and the messages they entered. For some entities, you may want to ensure that they’re only deleted after a certain period. You may also have to do so to comply with legal requirements. To this end, you can specify record retention policies for different entities, depending on how long you want them to remain in the Unblu database.
Unblu lets you specify record retention policies for:
-
Audit log entries
-
Conversations
-
Person presences and related entities (persons and device info entities); this is a preview feature
-
Webhook call log entries
The record retention policy for person presences also affects how long Unblu retains device and anonymous person entities. |
How record retention policies work
A record retention policy ensures that a specific time interval has passed before entities of a certain type are marked for deletion and collected by a garbage collection job. This interval runs from the timestamp of a particular event until the end of the period defined in the policy.
The event in question depends on the type of entity:
-
Audit log entries: the end of the retention interval is calculated from the timestamp of the entry’s creation.
-
Conversations: the end of the retention interval is calculated from the timestamp of when the conversation ended.
-
Person presences and related entities: the end of the retention interval is calculated from the timestamp of when the person presence ended, that is, when the person went offline or logged out.
-
Webhook call logs: the end of the retention interval is calculated from the timestamp of when the webhook call was executed.
When an entity is collected by a garbage collection job, the following data is deleted:
-
Audit log entries: the audit log entry in question
-
Conversations: the conversation and everything related to it, such as:
-
Messages
-
Files exchanged during the conversation
-
Bot threads
-
Conversation-specific configuration and text property settings
-
Canned response usages
-
Invitations to join the conversation
-
Any conversation recordings and their associated blobs
-
All conversation participations, presences, state changes and sessions
-
-
Person presences and related entities:
-
When a person presence is deleted, all related information is also deleted: person presence tracking, browser sessions, conversation presences, geolocation records, and remote IP address information
-
When a person is deleted, their related device info, activation timestamps, canned response usages, reasons for auto-pausing notifications, and metadata properties are also deleted.
-
-
Webhook call logs: the webhook call log entry in question, any blobs associated with the webhook call—this is the case if the request or response string was contained more than 5000 characters—and any references to the blobs.
Note that the order entities are deleted in isn’t specified. For example, if the number of entities of a particular type that expires within a check interval is greater than the batch size, you can’t know which entities will be deleted when the job is executed next.
Retention of person presences
This is a preview feature. It may be subject to change or removal with no further notice.
To enable preview features, set com.unblu.platform.enablePreview to true
.
For more information on preview features, refer to the Unblu release policy.
The record retention policies of person presences and their related entities have some particular features.
-
Person presences are deleted even if they’re referenced by a message in a conversation or a conversation presence.
If you set the person presence retention interval to, say, 1 day, and the conversation retention interval to 10 days, person presences referenced by a conversation are marked for deletion before the conversation is deleted.
-
Device information entities are only marked for deletion if they’re no longer referenced by a person presence.
-
Person entities are only marked for deletion if they’re anonymous—that is, if they aren’t authenticated—and there are no references to them from person presence or user entities.
Setting record retention policies
You can set record retention policies in the Record retention section of the Account Configuration interface, or by calling the Unblu web API endpoint recordretention/update
.
Admins can change the retention interval for their account within the lower and upper bounds specified by the configuration properties. Superadmins can also disable retention policies entirely.
Configuration properties for record retention policies
For each entity type, there are three configuration properties you can define:
-
The default retention interval for the entity. These retention intervals are automatically applied to the record retention policies of new accounts.
-
The maximum retention interval for the entity. These retention intervals are relevant when you modify an account’s record retention policies in the Account Configuration interface. If the admin enters a value that exceeds the value of the relevant configuration property, an error message appears beneath the input field.
Setting a large maximum retention interval increases the number of records stored in the Unblu database. In time, this can lead to performance issues. Retention intervals of more than 1 year are strongly discouraged. If you need to store data for longer than that, use a dedicated archiving system. -
When to display information about an impending deletion in the relevant Unblu UIs. These configuration properties provide default values for the record retention policies of new accounts, but they also affect existing record retention policies. Changes you make to them are reflected in the Record retention section of the Account Configuration interface and vice versa.
The possible values are:
-
One week before deletion; this is the default value
-
One day before deletion
-
The day of deletion
-
Never
-
For more information on the individual configuration properties, refer to the Record retention section of the configuration properties reference.
Permissible retention intervals
The retention intervals you specify must have a minimum duration.
-
For audit logs, conversations, and person presences, the shortest permissible retention interval is one day.
-
For webhook call logs, the shortest permissible retention interval is one hour.
If you set a retention interval that’s shorter than allowed, Unblu applies the shortest permissible retention interval to the entity in question.
You can set the maximum retention interval for each type of entity with the following configuration properties:
For new accounts, you can set the default retention period for each type of entity, for example with com.unblu.record_retention.conversationRetentionIntervalDefault. Note, however, that changing these configuration properties doesn’t affect the retention interval once the account’s been created.
Orphaned webhook delivery log payloads
Under certain circumstances, some payloads are orphaned when the corresponding webhook call log entries are deleted. There is a separate garbage collection job to remove orphaned webhook delivery log payloads. You configure it with the following configuration properties:
-
com.unblu.server.storage.blob.deliveryLogOrphanPayloadCleanup.checkInterval specifies, in seconds, the interval between runs of the cleanup job for orphaned payload entries. The default value is 300.
-
com.unblu.server.storage.blob.deliveryLogOrphanPayloadCleanup.deletionBatchSize specifies the maximum number of orphan payload entries to delete when the job is executed. The default value is 50000.
-
com.unblu.server.storage.blob.deliveryLogOrphanPayloadCleanup.maxDeletionChunkSize specifies the maximum number of orphan payload entries deleted from each account on the Collaboration Server when the job is executed. The default value is 1000.
The payload cleanup job is only required for cleaning up data created before the garbage collection feature was introduced. You can disable it by setting com.unblu.server.storage.blob.deliveryLogOrphanPayloadCleanup.enabled to false
.
See also
-
For information on specifying record retention policies in the Account Configuration interface, refer to Record retention in the Account Configuration interface guide.
-
For information on web API endpoints for record retention policies, refer to the
RecordRetention
section of the Unblu web API reference.