Contact usRequest a demo

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.

Additional preconditions for 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.

Person presences and their related entities must meet additional preconditions to be marked for deletion, even if their retention period is over.

  • Person presences are retained as long as 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 aren’t marked for deletion until 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:

  1. The default retention interval for the entity. These retention intervals are automatically applied to the record retention policies of new accounts.

  2. 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.
  3. 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.

See also