Integrate language operator results with your application
To build an end-to-end solution with Conversation Intelligence, integrate language operator results with your application. You can do this in either of the following ways:
- Rule Execution webhook: Receives language operator results as they're generated. Use for real-time activation.
- Intelligence API: Retrieves historical language operator results and conversations processed by Intelligence. Use for post-conversation activation.
The Rule Execution webhook sends language operator results to your webhook endpoint as an HTTP POST request when they're generated. Use these results to inform your application's next steps, such as:
- Update agent UIs
- Trigger alerts or notifications
- Invoke downstream automation
To receive this webhook, you must define a rule with a valid action (type: webhook) in your intelligence configuration.
The webhook payload includes:
- A list of all language operator results generated by the rule execution
- Execution details, including:
- Execution metadata, including latency, model used, and input/output character counts
- Intelligence configuration and conversation identifiers
For more information about the webhook payload structure and properties, see Rule Execution webhook.
1{2"accountId": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",3"conversationId": "conv_conversation_772a49ae-48e7-4d18-9db5-a40f6203de01",4"intelligenceConfiguration": {5"id": "intelligence_configuration_0hcq1h4zbqcpr8ceyyk4cde7kr",6"displayName": "Real-time Sentiment Analyzer",7"version": 1,8"ruleId": "intelligence_configurationrule_01kc6nrdc4f509sgccvd8hc27c"9},10"operatorResults": [11{12"id": "intelligence_operatorresult_01kc6nrdc4f9vrt6t2ypcy8b75",13"operator": {14"id": "intelligence_operator_01kcrvw16kfa88qvgrfmr7y151",15"displayName": "Sentiment",16"version": 2,17"parameters": null18},19"outputFormat": "CLASSIFICATION",20"result": {21"label": "positive"22},23"dateCreated": "2026-03-11T12:33:36.143498Z",24"referenceIds": [],25"executionDetails": {26"trigger": {27"on": "COMMUNICATION",28"timestamp": "2026-03-11T12:33:35.987654Z"29},30"communications": {31"first": "conv_communication_00000000000000000000000000",32"last": "conv_communication_00000000000000000000000001"33},34"channels": [35"SMS"36],37"participants": [38{39"id": "conv_participant_00000000000000000000000000",40"profileId": "mem_profile_00000000000000000000000000",41"type": "CUSTOMER"42},43{44"id": "conv_participant_00000000000000000000000001",45"profileId": null,46"type": "HUMAN_AGENT"47}48],49"resolvedContext": {50"memory": {51"profileId": "mem_profile_00000000000000000000000000",52"memoryStoreId": "mem_store_00000000000000000000000000"53},54"knowledge": {55"sources": [56{57"baseId": "know_knowledgebase_00000000000000000000000000",58"sourceId": "know_knowledge_00000000000000000000000000"59}60]61}62}63},64"metadata": {65"system": {66"latencyMs": 1842,67"resolvedModel": "gpt-5.4-mini",68"inputCharacters": 3830,69"outputCharacters": 150,70"inputTruncated": false71}72}73}74]75}
Use the OperatorResults and Conversations resources to retrieve historical language operator results and conversations processed by your intelligence configuration. You can use this data to:
- Analyze post-conversation results
- Report and audit
- Recover if a webhook delivery is missed
The OperatorResults resource returns:
- The result of the language operator
- Rule execution metadata, including:
- Parameter values
- Context used
- Rule and intelligence configuration IDs
You can filter results by:
- Intelligence configuration
- Conversation
The following is an example request and response using the OperatorResults resource:
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID at twilio.com/console5// Provision API Keys at twilio.com/console/runtime/api-keys6// and set the environment variables. See http://twil.io/secure7// For local testing, you can use your Account SID and Auth token8const accountSid = process.env.TWILIO_ACCOUNT_SID;9const apiKey = process.env.TWILIO_API_KEY;10const apiSecret = process.env.TWILIO_API_SECRET;11const client = twilio(apiKey, apiSecret, { accountSid: accountSid });1213async function listOperatorResults() {14const operatorResults = await client.intelligence.v3.operatorResults.list({15limit: 20,16});1718operatorResults.forEach((o) => console.log(o.outputFormat));19}2021listOperatorResults();
Response
1{2"items": [3{4"id": "intelligence_operatorresult_01k6fc25s7epm9qtk8rszbv3q5",5"accountId": "AC00000000000000000000000000000000",6"outputFormat": "JSON",7"intelligenceConfiguration": {8"id": "intelligence_configuration_01kermhm82e5mr98nbeh1hpmbn",9"ruleId": "intelligence_configurationrule_01kermhm81fwfvy7j0f7h7v5mr",10"version": 111},12"conversationId": "conv_conversation_01k1etk2y5f1y9fpe2epfdtvv2",13"operator": {14"id": "intelligence_operator_01kcgy1ew0e9x8re6jq542zt8b",15"version": 1,16"parameters": {17"scale": 518}19},20"dateCreated": "2026-01-15T10:45:30Z",21"referenceIds": [22"conv_communication_01k1etk2y5f1y9fpe2epfdtvv2"23],24"executionDetails": {25"trigger": {26"on": "CONVERSATION_END",27"timestamp": "2026-01-15T10:45:25Z"28},29"communications": {30"first": "conv_communication_01k1etk2y5f1y9fpe2epfdtvv2",31"last": "conv_communication_01k1etk2y5f1y9fpe2epfdtvv9"32},33"channels": [34"VOICE"35],36"participants": [37{38"id": "conv_participant_01k1etx3jbfx88476ccja0889c",39"profileId": "mem_profile_01k6fbz0v4f4e9qtk8p8z7y3w1",40"type": "CUSTOMER"41},42{43"id": "conv_participant_01k1etx3jbfx88476ccja0889d",44"type": "HUMAN_AGENT"45}46],47"resolvedContext": {48"memory": {49"profileId": "mem_profile_00000000000000000000000000",50"memoryStoreId": "mem_store_00000000000000000000000000"51},52"knowledge": {53"sources": [54{55"baseId": "know_knowledgebase_00000000000000000000000000",56"sourceId": "know_knowledge_00000000000000000000000000"57}58]59}60}61},62"result": {63"score": 5,64"explanation": "The agent followed the script closely and addressed all key points effectively."65}66},67{68"id": "intelligence_operatorresult_01k6fc25s7epm9qtk8rszbv3q6",69"accountId": "AC00000000000000000000000000000000",70"outputFormat": "CLASSIFICATION",71"intelligenceConfiguration": {72"id": "intelligence_configuration_01kermhm82e5mr98nbeh1hpmbn",73"ruleId": "intelligence_configurationrule_01kermhm81fwfvy7j0f7h7v5mr",74"version": 175},76"conversationId": "conv_conversation_01k1etk2y5f1y9fpe2epfdtvv2",77"operator": {78"id": "intelligence_operator_01kcgy1ew0e9x8re6jq542zt9c",79"version": 2,80"parameters": {}81},82"dateCreated": "2026-01-15T10:45:35Z",83"referenceIds": [84"conv_communication_01k1etk2y5f1y9fpe2epfdtvv2"85],86"executionDetails": {87"trigger": {88"on": "CONVERSATION_END",89"timestamp": "2026-01-15T10:45:25Z"90},91"communications": {92"first": "conv_communication_01k1etk2y5f1y9fpe2epfdtvv2",93"last": "conv_communication_01k1etk2y5f1y9fpe2epfdtvv9"94},95"channels": [96"VOICE"97],98"participants": [99{100"id": "conv_participant_01k1etx3jbfx88476ccja0889c",101"type": "CUSTOMER"102},103{104"id": "conv_participant_01k1etx3jbfx88476ccja0889d",105"type": "HUMAN_AGENT"106}107]108},109"result": {110"label": "POSITIVE"111}112}113],114"meta": {115"key": "items",116"pageSize": 2,117"nextToken": "next_page_token_example"118}119}
The Conversations resource returns Conversations processed by Conversation Intelligence and includes:
- Conversation metadata
- Intelligence configuration details
- Language operators and rules that ran on the Conversation
You can filter Conversations by:
- Intelligence configuration
- Language operators that have been executed
- Conversation metadata, such as channel, participant information, and date range
The following is an example request and response using the Conversations resource:
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID at twilio.com/console5// Provision API Keys at twilio.com/console/runtime/api-keys6// and set the environment variables. See http://twil.io/secure7// For local testing, you can use your Account SID and Auth token8const accountSid = process.env.TWILIO_ACCOUNT_SID;9const apiKey = process.env.TWILIO_API_KEY;10const apiSecret = process.env.TWILIO_API_SECRET;11const client = twilio(apiKey, apiSecret, { accountSid: accountSid });1213async function listConversations() {14const conversations = await client.intelligence.v3.conversations.list({15limit: 20,16});1718conversations.forEach((c) => console.log(c.id));19}2021listConversations();
Response
1{2"items": [3{4"id": "conv_conversation_01k1etk2y5f1y9fpe2epfdtvv2",5"accountId": "AC00000000000000000000000000000000",6"name": "Customer Support Call - Order #12345",7"status": "CLOSED",8"createdAt": "2026-01-15T10:30:00Z",9"updatedAt": "2026-01-15T10:45:30Z",10"intelligenceConfigurationIds": [11"intelligence_configuration_01kermhm82e5mr98nbeh1hpmbn"12],13"conversationConfigurationId": "conv_configuration_00000000000000000000000000",14"channels": [15"VOICE"16],17"channelIds": [18"CA1234567890abcdef1234567890abcdef"19],20"participants": [21{22"id": "conv_participant_01k1etx3jbfx88476ccja0889c",23"name": "John Customer",24"type": "CUSTOMER",25"addressValues": [26"+15551234567"27]28},29{30"id": "conv_participant_01k1etx3jbfx88476ccja0889d",31"name": "Sarah Agent",32"type": "HUMAN_AGENT",33"addressValues": [34"agent-sarah@example.com"35]36}37],38"operatorResultIds": [39"intelligence_operatorresult_01k6fc25s7epm9qtk8rszbv3q5"40]41},42{43"id": "conv_conversation_01k1etk2y5f1y9fpe2epfdtvv3",44"accountId": "AC00000000000000000000000000000000",45"name": "Sales Inquiry - WhatsApp",46"status": "ACTIVE",47"createdAt": "2026-01-15T14:20:00Z",48"updatedAt": "2026-01-15T14:22:00Z",49"intelligenceConfigurationIds": [50"intelligence_configuration_01kermhm82e5mr98nbeh1hpmbn"51],52"conversationConfigurationId": "conv_configuration_00000000000000000000000000",53"channels": [54"WHATSAPP"55],56"channelIds": [57"SM9876543210fedcba9876543210fedcba"58],59"participants": [60{61"id": "conv_participant_01k1etx3jbfx88476ccja0889e",62"name": "Maria Customer",63"type": "CUSTOMER",64"addressValues": [65"whatsapp:+15559876543"66]67},68{69"id": "conv_participant_01k1etx3jbfx88476ccja0889f",70"name": "AI Sales Assistant",71"type": "AI_AGENT",72"addressValues": [73"bot-sales@example.com"74]75}76],77"operatorResultIds": [78"intelligence_operatorresult_01k6fc25s7epm9qtk8rszbv3q7"79]80}81],82"meta": {83"key": "items",84"pageSize": 2,85"nextToken": "next_page_token_example"86}87}