Skip to main content
In Cognigy.AI, data retention for Analytics data is controlled by time-to-live (TTL) settings. TTL defines how long data is stored before automatic deletion. This article outlines the data expiration logic and provides examples of how different TTL settings affect data retention.

Data Expiration Logic

Cognigy.AI uses the smallest positive TTL value from the following sources:
  • Management UI Settings. The TTL is set at the organization level via the Management UI.
  • Infrastructure Variables. This TTL is set via a server-side environment variable starting with INSIGHTS_, for example, INSIGHTS_MAX_RAW_ANALYTICS_TTL_IN_MINUTES.
  • Additional Infrastructure Variables. This TTL is set via server-side environment variables, such asMAX_CONVERSATION_TTL_IN_MINUTES.
If no TTL values are positive or valid, the data doesn’t expire.
Configuration:
  • Management UI TTL = 6 months (262,800 minutes)
  • Infrastructure Flag TTL = 1 year (525,600 minutes)
Result: the data will expire after 6 months.

TTL for Analytics Data

Analytics data includes information from the Analytics database: Analytics, Sessions, Step Events, Steps, Conversations collections, and Contact Profiles. The expiration of this data is controlled by environment variables or settings configured in the Management UI. Each value defines how long a specific type of data is stored. Once the configured time is reached, the data is automatically deleted.
DataEnvironment VariableDescriptionDefault Value
Contact ProfilesMAX_CONTACT_PROFILE_TTL_IN_MINUTESMaximum time in minutes for Contact Profiles.43200 (30 days)
ConversationsMAX_CONVERSATION_TTL_IN_MINUTESMaximum time in minutes for conversations. This variable can be overridden by INSIGHTS_MAX_CONVERSATIONS_TTL_IN_MINUTES. For more information, read TTL for Conversations.43200 (30 days)
Raw AnalyticsINSIGHTS_MAX_RAW_ANALYTICS_TTL_IN_MINUTESTime in minutes after which raw analytics in Insights data expires. 0 means no expiration.0
Conversations (Insights)INSIGHTS_MAX_CONVERSATIONS_TTL_IN_MINUTESTime in minutes after which conversation data in Insights expires. 0 means no expiration. This variable overrides MAX_CONVERSATION_TTL_IN_MINUTES. For more information, read TTL for Conversations.0
Step EventsINSIGHTS_MAX_STEP_EVENTS_TTL_IN_MINUTESTime in minutes after which step event data in Insights expires. 0 means no expiration.0
StepsINSIGHTS_MAX_STEPS_TTL_IN_MINUTESTime in minutes after which step data in Insights expires. 0 means no expiration.0
SessionsINSIGHTS_MAX_SESSIONS_TTL_IN_MINUTESTime in minutes after which session data in Insights expires. 0 means no expiration.0
Management UI TTL (minutes)INSIGHTS_MAX_RAW_ANALYTICS_TTL_IN_MINUTESAnalytics Expires After
525,600 (1 year)262,800 (6 months)262,800 (6 months)
0525,600 (1 year)525,600 (1 year)
262,800 (6 months)525,600 (1 year)262,800 (6 months)
525,600 (1 year)0525,600 (1 year)
00Doesn’t expire

TTL for Conversations

Conversation data in Cognigy.AI expires according to the following data expiration logic:
  1. The system first checks the environment variable: INSIGHTS_MAX_CONVERSATIONS_TTL_IN_MINUTES. If this variable is set and has a positive value, it takes precedence.
  2. If the INSIGHTS_MAX_CONVERSATIONS_TTL_IN_MINUTES variable isn’t set or invalid, it falls back to MAX_CONVERSATION_TTL_IN_MINUTES.
  3. The TTL set in the Management UI is always included in the final check.
  4. The system picks the smallest positive TTL from the three sources to decide when conversation data expires.
Management UI TTL (min)INSIGHTS_MAX_CONVERSATIONS_TTL_IN_MINUTESMAX_CONVERSATION_TTL_IN_MINUTESConversation Expires After
000Doesn’t expire
406040 minutes
03030 minutes
403030 minutes
906012060 minutes
30452525 minutes
206020 minutes
1010 minutes

More Information

I