This guide explains the structure of the Tekst data, which is organized into three main tables: `datasources`, `threads`, and `messages`.
Datasources table
The datasource table contains information about your connected data sources:
| Column Name | Data Type | Description |
| id | VARCHAR(256) | Unique identifier for the integration |
| name | VARCHAR(256) | Name of the integration (usually email address) |
| type | VARCHAR(256) | Type of integration (e.g. outlook, salesforce, ...) |
Threads table
The threads table contains aggregate information about email threads:
| Column Name | Data Type | Description |
| integration_id | VARCHAR | Unique identifier linking to datasources.id |
| thread_id | VARCHAR | Unique identifier for the thread |
| time | TIMESTAMP | Timestamp of the thread |
| status | VARCHAR | Thread status ('replied' or 'open') |
| messages | INTEGER | Number of messages in the thread |
| participants | INTEGER | Number of participants in the thread |
| first_response_time_seconds | REAL | Time to first response in seconds |
| model_* | VARCHAR | Multiple columns for each model (e.g., model_topic, model_region) |
Messages table
The messages table contains detailed information about individual email messages:
| Column Name | Data Type | Description |
| integration_id | VARCHAR | Unique identifier linking to datasources.id |
| thread_id | VARCHAR | Unique identifier linking to threads.thread_id |
| message_id | VARCHAR | Unique identifier for the message |
| time | TIMESTAMP | Timestamp of the message |
| type | VARCHAR | Message type ('sent' or 'received') |
| thread_number | INTEGER | Sequential number of the message in the thread |
| receiver | VARCHAR | Array of receiver domain names |
| sender | VARCHAR | Sender domain name |
| cc | VARCHAR | Array of CC domain names |
| bcc | VARCHAR | Array of BCC domain names |
| how_received | VARCHAR | How the message was received ('sender', 'receiver', 'cc', 'bcc', or 'unknown') |
Important Notes
Relationships
- `datasources.id` links to `threads.integration_id` and `messages.integration_id`
- `threads.thread_id` links to `messages.thread_id`
Data Uniqueness
- Each `thread_id and integration_id pair` appears only once in the threads table (no duplicates)
- Each `message_id and thread_id and integration_id pair` appears only once in the messages table (no duplicates)
Technical Details
- The `model_*` columns in the threads table are dynamically created based on your configured facets.
- Domain names in the messages table are stored in a decrypted format.
- Arrays (receiver, cc, bcc) are stored as comma-separated lists.
- All timestamps are in UTC.
For more information about specific columns or data types, please contact our support team.
0 comments
Please sign in to leave a comment.