Skip to contentSkip to navigationSkip to topbar
Page toolsOn this page
Looking for more inspiration?Visit the

Data model


Conversation Insights uses a semantic data model based on OLAP (Online Analytical Processing) concepts. This page explains the key concepts and lists the available data you can query.


Core concepts

core-concepts page anchor

Cubes

cubes page anchor

A cube is a collection of related data organized for analysis. Each cube contains measures and dimensions that you can query together. Conversation Insights provides the following cubes:

  • Conversation: conversation metadata from Conversation Orchestrator.
  • OperatorResult: results from intelligence operators run on conversations.

Measures are numeric values that can be aggregated. Use measures to count, sum, or calculate statistics across your data.

Example: Conversation.Count returns the count of unique conversations.

Dimensions are attributes that describe your data. Use dimensions to filter results or group measures into categories.

Example: Conversation.ConversationStatus contains the current status of the conversation.


The Conversation cube contains metadata about conversations captured by Conversation Orchestrator.

The Conversation cube includes the following measures:

NameTypeDescription
Conversation.CountnumberThe count of unique conversations.

The Conversation cube includes the following dimensions:

NameTypeDescription
Conversation.ConversationIdstringThe unique identifier for the conversation.
Conversation.ConversationNamestringThe name of the conversation.
Conversation.ConversationStatusstringThe current status of the conversation.
Conversation.IntelligenceConfigurationIdsstringThe intelligence configurations associated with the conversation.
Conversation.ParticipantIdstringThe unique identifier for the participant.
Conversation.ParticipantTypestringThe type of participant (for example, agent or customer).
Conversation.ParticipantProfileIdstringThe profile identifier for the participant.
Conversation.CreatedDate.hourtimeThe date and time when the conversation was created, grouped by hour. Use .day, .week, or .month for other granularities.

The OperatorResult cube contains results from intelligence operators run on conversations. Use this cube to count and group operator results by operator name, label, channel, or configuration.

The following operators produce results in the OperatorResult cube:

The OperatorResult cube includes the following measures:

NameTypeDescription
OperatorResult.CountnumberThe count of unique operator results.

OperatorResult dimensions

operatorresult-dimensions page anchor

The OperatorResult cube includes the following dimensions:

NameTypeDescription
OperatorResult.ConversationIdstringThe unique identifier for the conversation.
OperatorResult.IntelligenceConfigurationIdstringThe unique identifier for the intelligence configuration.
OperatorResult.IntelligenceConfigurationNamestringThe display name of the intelligence configuration.
OperatorResult.KnowledgeBaseIdstringThe Knowledge Base ID used during operator rule execution.
OperatorResult.MemoryStoreIdstringThe unique identifier for the Knowledge Base linked to the operator result.
OperatorResult.OperatorIdstringThe unique identifier for the operator.
OperatorResult.OperatorNamestringThe name of the operator (for example, Sentiment Analysis).
OperatorResult.OperatorLabelstringThe label associated with the operator result (for example, positive, negative).
OperatorResult.ExecutedChannelsstringThe communication channel for the conversation (for example, voice, chat, sms, whatsapp).
OperatorResult.CreatedDate.hourtimeThe date and time when the operator result was created, grouped by hour. Use .day, .week, or .month for other granularities.

Time dimensions group data by time periods. Use dimension names with granularity suffixes.

Conversation cube:

  • Conversation.CreatedDate.hour: group by hour
  • Conversation.CreatedDate.day: group by day
  • Conversation.CreatedDate.week: group by week
  • Conversation.CreatedDate.month: group by month

OperatorResult cube:

  • OperatorResult.CreatedDate.hour: group by hour
  • OperatorResult.CreatedDate.day: group by day
  • OperatorResult.CreatedDate.week: group by week
  • OperatorResult.CreatedDate.month: group by month

See Query syntax for examples.


Use the Metadata API to retrieve the current list of cubes, measures, and dimensions:

Retrieve available cubes, measures, and dimensionsLink to code sample: Retrieve available cubes, measures, and dimensions
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID at twilio.com/console
5
// Provision API Keys at twilio.com/console/runtime/api-keys
6
// and set the environment variables. See http://twil.io/secure
7
// For local testing, you can use your Account SID and Auth token
8
const accountSid = process.env.TWILIO_ACCOUNT_SID;
9
const apiKey = process.env.TWILIO_API_KEY;
10
const apiSecret = process.env.TWILIO_API_SECRET;
11
const client = twilio(apiKey, apiSecret, { accountSid: accountSid });
12
13
async function fetchMetadata() {
14
const metadata = await client.insights.v3.metadata.fetch();
15
16
console.log(metadata.domain);
17
}
18
19
fetchMetadata();

The metadata response provides the authoritative list of available data, including descriptions and types.


Explore the following resources to learn more: