Skip to contentSkip to navigationSkip to topbar
Page tools
Useful for sharing or LLM
Accelerate development with AI

On this page
Looking for more inspiration?Visit the

Build on-demand workflows with Conversation Intelligence


Automatic triggers run rules on conversation lifecycle events, such as each new communication or the end of a conversation. On-demand rule execution puts your application in control instead. Logic and data in your own systems, outside of Twilio, determine when and how language operators run.

To run a rule on demand, make a POST /v3/RuleExecutions request. Conversation Intelligence runs the rule asynchronously and delivers the results to your webhook.

Use on-demand rule execution when your application should decide:

  • Which language operators run, based on earlier results, conversation metadata, or your business rules. See Example 1.
  • When language operators run, at a business event such as a handoff, escalation, or wrap-up. See Example 2.
  • How language operators run, using data from your own systems that you pass into the prompt. See Example 3.

Prerequisites

prerequisites page anchor

For each workflow you need:


Example 1: Tiered intelligence with conversation metadata

example-1-tiered-intelligence-with-conversation-metadata page anchor

This example shows how to run operators conditionally — invoking deeper analysis only when earlier signals indicate it's needed. To do this, the first operator runs on an incoming message and its result is written to conversation metadata — a key-value store on the Conversation resource that carries state forward across messages. On the next message, your application reads that metadata and decides whether to invoke a second operator for more detailed analysis on the same conversation.

  1. Define the rules to run on demand.

    In your intelligence configuration, define the following rules:

    • Intent Detection: Set the operator to your intent classifier, and set the trigger to On-demand (triggers: []).
    • Inquiry Analysis: Set the operator to your detailed analysis operator, and set the trigger to On-demand (triggers: []).

    For more information on rules and triggers, see Define rules.

    Write down the Rule IDs. You need these IDs when making POST /v3/RuleExecutions requests.

  2. Check the metadata for incoming messages.

    Read the conversation to check whether intent has already been classified. This prevents re-running the Intent Detection operator on every message:

    Check conversation metadataLink to code sample: Check conversation metadata
    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 fetchConversation() {
    14
    const conversation = await client.conversations.v2
    15
    .conversations("conv_conversation_xxxxxxxxxxxxxxxxxxxxxxxxx")
    16
    .fetch();
    17
    18
    console.log(conversation.id);
    19
    }
    20
    21
    fetchConversation();

    The first message in the conversation has empty metadata.

    1
    {
    2
    "id": "conv_conversation_xxxxxxxxxxxxxxxxxxxxxxxxx",
    3
    "status": "ACTIVE",
    4
    ...
    5
    "metadata": {}
    6
    }
  3. Run the Intent Detection rule on-demand.

    Make a POST /v3/RuleExecutions request:

    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 createRuleExecution() {
    14
    await client.intelligence.v3.ruleExecutions.create({
    15
    intelligenceConfigurationId:
    16
    "intelligence_configuration_01k6fc25s7epm9qtk8rszbv3q5",
    17
    ruleId: "intelligence_configurationrule_01k6fc25s7epm9qtk8rszbv3q6",
    18
    conversationId: "conv_conversation_01k1etk2y5f1y9fpe2epfdtvv2",
    19
    });
    20
    }
    21
    22
    createRuleExecution();

    A successful request returns 202 Accepted. Execution is asynchronous. The result arrives at your webhook once analysis completes.

  4. Receive the Intent Detection result in your webhook.

    Webhook: Intent Detection result

    webhook-intent-detection-result page anchor
    1
    {
    2
    "accountId": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    3
    "conversationId": "conv_conversation_xxxxxxxxxxxxxxxxxxxxxxxxx",
    4
    "intelligenceConfiguration": {
    5
    "id": "intelligence_configuration_xxxxxxxxxxxxxxxxxxxxxxxxx",
    6
    "displayName": "Support Intake",
    7
    "version": 2,
    8
    "ruleId": "intelligence_configurationrule_xxxxxxxxxxxxxxxxxxxxxxxxx"
    9
    },
    10
    "operatorResults": [
    11
    {
    12
    "id": "intelligence_operatorresult_xxxxxxxxxxxxxxxxxxxxxxxxx",
    13
    "operator": {
    14
    "id": "intelligence_operator_xxxxxxxxxxxxxxxxxxxxxxxxx",
    15
    "displayName": "Intent Detection",
    16
    "version": 1
    17
    },
    18
    "outputFormat": "JSON",
    19
    "result": {
    20
    "intent": "billing_dispute"
    21
    },
    22
    "dateCreated": "2026-09-21T14:32:11Z",
    23
    "referenceIds": [],
    24
    "executionDetails": {
    25
    "trigger": {
    26
    "on": "ON_DEMAND",
    27
    "timestamp": "2026-09-21T14:32:11.254049339Z"
    28
    }
    29
    },
    30
    "metadata": {
    31
    "system": {
    32
    "latencyMs": 1250,
    33
    "resolvedModel": "gpt-5.4-mini",
    34
    "inputCharacters": 4521,
    35
    "outputCharacters": 18,
    36
    "inputTruncated": false
    37
    }
    38
    }
    39
    }
    40
    ]
    41
    }

    Both rules in this example deliver results to the same webhook. Use intelligenceConfiguration.ruleId to identify which rule produced the result, and read the detected intent from operatorResults[].result.

  5. Write the Intent Detection result to your conversation metadata.

    Configure your webhook handler to make a PATCH /v2/Conversations/{id} request with the updated metadata:

    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 patchConversationById() {
    14
    const conversation = await client.conversations.v2
    15
    .conversations("conv_conversation_xxxxxxxxxxxxxxxxxxxxxxxxx")
    16
    .patch({
    17
    metadata: {
    18
    detected_intent: "billing_dispute",
    19
    },
    20
    });
    21
    22
    console.log(conversation.id);
    23
    }
    24
    25
    patchConversationById();

    For full details on metadata merge behavior, key limits, and constraints, see Conversation metadata.

  6. On subsequent messages, check the metadata to decide what to run next.

    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 fetchConversation() {
    14
    const conversation = await client.conversations.v2
    15
    .conversations("conv_conversation_xxxxxxxxxxxxxxxxxxxxxxxxx")
    16
    .fetch();
    17
    18
    console.log(conversation.id);
    19
    }
    20
    21
    fetchConversation();
    1
    {
    2
    "id": "conv_conversation_xxxxxxxxxxxxxxxxxxxxxxxxx",
    3
    "status": "ACTIVE",
    4
    ...
    5
    "metadata": {
    6
    "detected_intent": "billing_dispute"
    7
    }
    8
    }

    Your application uses the detected intent to decide whether to run the Inquiry Analysis operator.

    • If the intent is self-serve (for example, balance_check or location_lookup), no further analysis is needed and the flow ends.
    • If the intent signals a complex inquiry (for example, billing_dispute), run the Inquiry Analysis rule to gather more details.
  7. To run the Inquiry Analysis on-demand, make a POST /v3/RuleExecutions request.

    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 createRuleExecution() {
    14
    await client.intelligence.v3.ruleExecutions.create({
    15
    intelligenceConfigurationId:
    16
    "intelligence_configuration_01k6fc25s7epm9qtk8rszbv3q5",
    17
    ruleId: "intelligence_configurationrule_01k6fc4wj3f0kk3m3s0jvv3v7f",
    18
    conversationId: "conv_conversation_01k1etk2y5f1y9fpe2epfdtvv2",
    19
    });
    20
    }
    21
    22
    createRuleExecution();

    A successful request returns 202 Accepted.

  8. Receive the Inquiry Analysis result in your webhook.

    Webhook: Inquiry Analysis result

    webhook-inquiry-analysis-result page anchor
    1
    {
    2
    "accountId": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    3
    "conversationId": "conv_conversation_xxxxxxxxxxxxxxxxxxxxxxxxx",
    4
    "intelligenceConfiguration": {
    5
    "id": "intelligence_configuration_xxxxxxxxxxxxxxxxxxxxxxxxx",
    6
    "displayName": "Support Intake",
    7
    "version": 2,
    8
    "ruleId": "intelligence_configurationrule_yyyyyyyyyyyyyyyyyyyyyyyyy"
    9
    },
    10
    "operatorResults": [
    11
    {
    12
    "id": "intelligence_operatorresult_xxxxxxxxxxxxxxxxxxxxxxxxx",
    13
    "operator": {
    14
    "id": "intelligence_operator_xxxxxxxxxxxxxxxxxxxxxxxxx",
    15
    "displayName": "Inquiry Analysis",
    16
    "version": 1
    17
    },
    18
    "outputFormat": "JSON",
    19
    "result": {
    20
    "intent": "billing_dispute",
    21
    "sub_intent": "duplicate_charge",
    22
    "recommended_action": "specialist_review"
    23
    },
    24
    "dateCreated": "2026-09-21T14:33:05Z",
    25
    "referenceIds": [],
    26
    "executionDetails": {
    27
    "trigger": {
    28
    "on": "ON_DEMAND",
    29
    "timestamp": "2026-09-21T14:33:05.891204112Z"
    30
    }
    31
    },
    32
    "metadata": {
    33
    "system": {
    34
    "latencyMs": 890,
    35
    "resolvedModel": "gpt-5.4-mini",
    36
    "inputCharacters": 5832,
    37
    "outputCharacters": 31,
    38
    "inputTruncated": false
    39
    }
    40
    }
    41
    }
    42
    ]
    43
    }
  9. To write the Inquiry Analysis result to your conversation metadata, configure your webhook handler to make a PATCH /v2/Conversations/{id} request with the updated metadata.

    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 patchConversationById() {
    14
    const conversation = await client.conversations.v2
    15
    .conversations("conv_conversation_xxxxxxxxxxxxxxxxxxxxxxxxx")
    16
    .patch({
    17
    metadata: {
    18
    detected_intent: "billing_dispute",
    19
    sub_intent: "duplicate_charge",
    20
    inquiry_result: "specialist_review",
    21
    },
    22
    });
    23
    24
    console.log(conversation.id);
    25
    }
    26
    27
    patchConversationById();

    For full details on metadata merge behavior, key limits, and constraints, see Conversation metadata.


Example 2: Human handoff summary

example-2-human-handoff-summary page anchor

This example shows how to trigger a conversation summary at the moment of handoff, so the agent receives context as early as possible, without waiting for the conversation to close. When your application triggers a handoff, it makes an API request for on-demand rule execution, and Conversation Intelligence analyzes the transcript up to that point and delivers the result to your webhook.

  1. In your intelligence configuration, define a Summary rule with the Summary operator and set the trigger to On-demand (triggers: []).

    For more information on rules and triggers, see Define rules.

    Write down the Rule ID. You'll need these IDs when making POST /v3/RuleExecutions requests.

  2. To run the Summary rule on-demand, make a POST /v3/RuleExecutions request.

    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 createRuleExecution() {
    14
    await client.intelligence.v3.ruleExecutions.create({
    15
    intelligenceConfigurationId:
    16
    "intelligence_configuration_01k6fc25s7epm9qtk8rszbv3q5",
    17
    ruleId: "intelligence_configurationrule_01k6fc25s7epm9qtk8rszbv3q6",
    18
    conversationId: "conv_conversation_01k1etk2y5f1y9fpe2epfdtvv2",
    19
    });
    20
    }
    21
    22
    createRuleExecution();

    A successful request returns 202 Accepted. Your handoff routing logic continues without waiting for the result.

  3. Receive the Summary result in your webhook.

    Webhook: Summary result

    webhook-summary-result page anchor
    1
    {
    2
    "accountId": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    3
    "conversationId": "conv_conversation_xxxxxxxxxxxxxxxxxxxxxxxxx",
    4
    "intelligenceConfiguration": {
    5
    "id": "intelligence_configuration_xxxxxxxxxxxxxxxxxxxxxxxxx",
    6
    "displayName": "Agent Handoff",
    7
    "version": 1,
    8
    "ruleId": "intelligence_configurationrule_xxxxxxxxxxxxxxxxxxxxxxxxx"
    9
    },
    10
    "operatorResults": [
    11
    {
    12
    "id": "intelligence_operatorresult_xxxxxxxxxxxxxxxxxxxxxxxxx",
    13
    "operator": {
    14
    "id": "intelligence_operator_xxxxxxxxxxxxxxxxxxxxxxxxx",
    15
    "displayName": "Summary",
    16
    "version": 1
    17
    },
    18
    "outputFormat": "JSON",
    19
    "result": {
    20
    "summary": "Customer contacted support about a charge that appeared twice on their account. They confirmed the transaction date and amount. No resolution reached before handoff.",
    21
    "sentiment": "frustrated"
    22
    },
    23
    "dateCreated": "2026-09-18T15:04:22Z",
    24
    "referenceIds": [],
    25
    "executionDetails": {
    26
    "trigger": {
    27
    "on": "ON_DEMAND",
    28
    "timestamp": "2026-09-18T15:04:22.314081227Z"
    29
    }
    30
    },
    31
    "metadata": {
    32
    "system": {
    33
    "latencyMs": 3120,
    34
    "resolvedModel": "gpt-5.4-mini",
    35
    "inputCharacters": 8204,
    36
    "outputCharacters": 89,
    37
    "inputTruncated": false
    38
    }
    39
    }
    40
    }
    41
    ]
    42
    }
  4. Surface the summary in your agent desktop.

    Your webhook handler receives the summary payload and extracts the result. From there, push it to your agent desktop using the mechanism your platform supports, such as a WebSocket event, a server-sent event, or a direct API request to your CRM or agent platform.

    Your webhook handler extracts the result object from the incoming payload:

    1
    {
    2
    "result": {
    3
    "summary": "Customer contacted support about a charge that appeared twice on their account. They confirmed the transaction date and amount. No resolution reached before handoff.",
    4
    "sentiment": "frustrated"
    5
    }
    6
    }

Example 3: Pass dynamic data into a language operator prompt

example-3-pass-dynamic-data-into-a-language-operator-prompt page anchor

Parameter values stored in an intelligence configuration rule are static: you set them once, and they apply to every conversation. With parameter overrides, your application passes parameter values in each POST /v3/RuleExecutions request instead. This lets you insert data from your own systems into the language operator prompt, including data that isn't stored in Twilio or that differs for each conversation.

Parameter overrides work best for small, specific values that your application knows when it makes the request. For example:

  • Customer and account data from your CRM or billing system: Plan tier, account balance, open support cases, or offer eligibility
  • Business rules: Refund limits, SLA targets, or current promotions
  • Operational context: Known service outages, order or shipment status, or the reason the conversation started, such as a campaign or IVR selection
  • Tenant-specific values: If you're an ISV, the brand name, policies, or scoring rubric for each of your customers, so a single language operator serves all of them
  • Short reference content: Policy excerpts or scripts that you maintain in your own systems. For large or frequently searched content, use Enterprise Knowledge.

Your application looks up the data and passes it in the request. Conversation Intelligence inserts the values into the prompt, runs the language operator, and sends the result to your webhook.

In this example, a custom language operator checks whether a billing support agent quoted the customer's correct account balance and payment due date. Both values come from your billing system and differ for every customer. When the agent wraps up the conversation, your application looks them up and passes them as parameter overrides.

  1. Create a custom language operator that references parameters in its prompt.

    Create a custom language operator with two string parameters, account_balance and payment_due_date, and reference them in the prompt using {{parameters.<param_name>}} syntax:

    Language operator prompt

    language-operator-prompt page anchor
    1
    # Goal
    2
    3
    Determine whether the agent gave the customer correct account details.
    4
    5
    # Account details
    6
    7
    - Current balance: {{parameters.account_balance}}
    8
    - Next payment due date: {{parameters.payment_due_date}}
    9
    10
    # Steps
    11
    12
    1. Find each place in the conversation where the agent states the
    13
    customer's balance or payment due date.
    14
    2. Compare what the agent said to the account details above.
    15
    3. If the agent didn't mention a value, treat it as accurate.
    16
    4. Return JSON with balanceAccurate, dueDateAccurate, and a brief
    17
    evidence statement that quotes what the agent said.

    For parameter types, required parameters, and default values, see Defining parameters.

    Write down the operator ID. You need it for your parameter overrides.

  2. Define a rule to run on demand.

    In your intelligence configuration, define an Account Accuracy Check rule with your custom language operator and an On-demand trigger (triggers: []). You don't need to store parameter values in the rule, because your application supplies them on each request.

    Write down the Rule ID.

  3. When the agent wraps up the conversation, retrieve the customer's current account balance and payment due date from your billing system.

  4. Run the rule on demand with parameter overrides.

    Make a POST /v3/RuleExecutions request that includes a rule object. Set rule.operators[].id to your operator ID and rule.operators[].parameters to the values from your billing system:

    Execute Account Accuracy Check with parameter overridesLink to code sample: Execute Account Accuracy Check with parameter overrides
    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 createRuleExecution() {
    14
    await client.intelligence.v3.ruleExecutions.create({
    15
    intelligenceConfigurationId:
    16
    "intelligence_configuration_01k6fc25s7epm9qtk8rszbv3q5",
    17
    ruleId: "intelligence_configurationrule_01k6fc7m2q8r4t6v9x3z5b7d1f",
    18
    conversationId: "conv_conversation_01k1etk2y5f1y9fpe2epfdtvv2",
    19
    rule: {
    20
    operators: [
    21
    {
    22
    id: "intelligence_operator_01k6fc8n3r9s5u7w0y4a6c8e2g",
    23
    parameters: {
    24
    account_balance: "$142.50",
    25
    payment_due_date: "October 18, 2026",
    26
    },
    27
    },
    28
    ],
    29
    },
    30
    });
    31
    }
    32
    33
    createRuleExecution();

    A successful request returns 202 Accepted. The override applies to this execution only and doesn't modify the stored rule.

    The request returns 400 Bad Request if the operator id isn't in the stored rule, a parameter isn't defined by the operator, a value isn't valid for its parameter type, or a required parameter without a default has no value.

  5. Receive the result in your webhook.

    Webhook: Account Accuracy Check result

    webhook-account-accuracy-check-result page anchor
    1
    {
    2
    "accountId": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    3
    "conversationId": "conv_conversation_01k1etk2y5f1y9fpe2epfdtvv2",
    4
    "intelligenceConfiguration": {
    5
    "id": "intelligence_configuration_01k6fc25s7epm9qtk8rszbv3q5",
    6
    "displayName": "Billing Support QA",
    7
    "version": 1,
    8
    "ruleId": "intelligence_configurationrule_01k6fc7m2q8r4t6v9x3z5b7d1f"
    9
    },
    10
    "operatorResults": [
    11
    {
    12
    "id": "intelligence_operatorresult_xxxxxxxxxxxxxxxxxxxxxxxxx",
    13
    "operator": {
    14
    "id": "intelligence_operator_01k6fc8n3r9s5u7w0y4a6c8e2g",
    15
    "displayName": "Account Accuracy Check",
    16
    "version": 1,
    17
    "parameters": {
    18
    "account_balance": "$142.50",
    19
    "payment_due_date": "October 18, 2026"
    20
    }
    21
    },
    22
    "outputFormat": "JSON",
    23
    "result": {
    24
    "balanceAccurate": true,
    25
    "dueDateAccurate": false,
    26
    "evidence": "Agent stated the balance was $142.50, which matches. Agent told the customer the payment was due on October 25, but the due date is October 18."
    27
    },
    28
    "dateCreated": "2026-10-06T14:32:09Z",
    29
    "referenceIds": [],
    30
    "executionDetails": {
    31
    "trigger": {
    32
    "on": "ON_DEMAND",
    33
    "timestamp": "2026-10-06T14:32:09.118407552Z"
    34
    }
    35
    },
    36
    "metadata": {
    37
    "system": {
    38
    "latencyMs": 2870,
    39
    "resolvedModel": "gpt-5.4-mini",
    40
    "inputCharacters": 7412,
    41
    "outputCharacters": 214,
    42
    "inputTruncated": false
    43
    }
    44
    }
    45
    }
    46
    ]
    47
    }
  6. Act on the result.

    If balanceAccurate or dueDateAccurate is false, route the conversation to your QA review queue or send the customer a follow-up message with the correct details.