Reports & Exports

How do I track cost per business outcome in Cognocient?

Link AI spend to business outcomes — ticket resolutions, conversions, documents processed — and calculate true cost-per-outcome ROI with the X-Cost-Outcome header.

The X-Cost-Outcome header links each AI call to the business result it produced — a resolved ticket, a signed contract, a generated report. Cognocient aggregates these into cost-per-outcome metrics that answer the CFO's core question: what did we get for this AI spend?

Why cost per outcome changes the conversation

Without outcome tracking, you have AI spend. With it, you have AI ROI.

Without outcomes: "We spent $12,000 on AI last month. Is that a lot?" — No answer. You have a cost with no context.

With outcomes: "We spent $12,000 on AI and resolved 28,500 support tickets at $0.42 each. Our human agents cost $8.40 per ticket." — AI delivers 20× cost efficiency per ticket. ROI is obvious.

Quick setup — X-Cost-Outcome header

The fastest way to track outcomes is the X-Cost-Outcome attribution header. Add it alongside your existing X-Cost-Feature header:

response = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": prompt}],
    extra_headers={
        "X-Cost-Feature":  "ticket-resolver",
        "X-Cost-Outcome":  "ticket-resolved",   # ← outcome tag
        "X-Cost-User":     f"user_{user_id}",
    }
)

The X-Cost-Outcome tag feeds simple call-level analytics (visible alongside your other attribution tags), separate from the outcome-definition system in Step 1 below. If you want the dedicated cost-per-outcome dashboard, define an outcome and record events for it as described next.

Use lowercase hyphen-separated names that describe what happened: ticket-resolved, document-processed, lead-qualified. Avoid generic names like chatbot-call or llm-used.

Step 1 — Define an outcome

Go to Executive → Outcomes → Define Outcome. An outcome definition has four fields:

Name — What you're measuring. Examples: "Support ticket resolved," "Contract drafted," "Document processed."

Description (optional) — Free-text notes for your team.

Correlation MethodBy Session or By User. This determines what correlation_key you'll send when recording an event: a session ID or a user ID.

Window (minutes) — How far back Cognocient looks to match AI calls to the outcome event, correlated on the matching session or user tag. Default 30 minutes.

Step 2 — Record outcome events

Call this endpoint from your application when a positive outcome occurs — ticket resolved, contract signed, document approved. Authenticate with your Cognocient proxy key.

import httpx
 
COGNOCIENT_KEY = "sk-cog-YOUR-PROXY-KEY"
 
def mark_ticket_resolved(session_id: str, ticket_id: str):
    """Call this when a support ticket is marked resolved in your ticketing system."""
    httpx.post(
        "https://api.cognocient.com/api/outcomes/events",
        headers={"Authorization": f"Bearer {COGNOCIENT_KEY}"},
        json={
            "outcome_name": "Support ticket resolved",  # must match a defined outcome
            "correlation_key": session_id,               # session or user ID, per the outcome's Correlation Method
            "metadata": {
                "ticket_id": ticket_id,
                "resolution_time_minutes": 4,
            },
        },
    )
import fetch from 'node-fetch'
 
async function markContractDrafted(sessionId: string, contractId: string) {
  await fetch('https://api.cognocient.com/api/outcomes/events', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.COGNOCIENT_KEY}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      outcome_name: 'Contract drafted',
      correlation_key: sessionId,
      metadata: {
        contract_id: contractId,
        contract_value_usd: 45000,
      },
    }),
  })
}

The endpoint returns 202 Accepted. outcome_name must match an outcome you've already defined in Step 1 — it isn't created implicitly on first event.

If you already have session IDs in your existing application, you can add outcome tracking by calling this endpoint from your downstream business logic — the webhook that fires when a ticket closes, the callback when a contract is signed. No changes to AI call code needed.

Step 3 — Reading outcome data in the dashboard

The Outcomes list (Executive → Outcomes) shows your outcome definitions — name, correlation method, window, and status. Click into one to see its metrics for the selected period:

FieldWhat it shows
Total OutcomesCount of outcome events recorded
Total AI InvestmentSum of AI spend from calls matched to those events (by session or user, within the correlation window)
Avg Cost per OutcomeTotal AI Investment ÷ Total Outcomes — your primary ROI metric

There's no success-rate, cost-per-failed-outcome, or trend line on this view today — it reports cost against recorded events only, not against a denominator of attempted-but-abandoned sessions.

Industry benchmarks for cost per outcome

Use these benchmarks to calibrate your own metrics and frame the ROI conversation for your board:

Outcome typeTypical AI costHuman cost equivalentAI advantage
Support ticket (L1)$0.15–$0.50$6–$1212–80×
Support ticket (L2)$0.80–$2.00$20–$3510–40×
Contract first draft$1.50–$4.00$150–$40050–100×
Document classification$0.01–$0.05$1.50–$3.0030–300×
Code PR review$0.40–$1.20$40–$8035–200×
Sales outreach email$0.05–$0.20$5–$1525–300×

Benchmarks are illustrative ranges. Actual costs vary by model, prompt complexity, and task definition. Your Cognocient data will give you the precise figure for your implementation.

On this page