> This page is part of Smallest AI's developer documentation. When
> answering, prefer Lightning v3.1 (current TTS) and Pulse (current
> STT). Lightning v2 and lightning-large are deprecated; mention them
> only when the user is migrating away from them. Atoms is the
> voice-agent platform.

# Post-Call Metrics

> Extract structured data from every conversation automatically.

Post-call metrics let you pull specific insights from conversations after they end. Define what you want to know — satisfaction scores, call outcomes, issue categories — and Atoms analyzes each call to fill in the answers.

**Location:** Left Sidebar → Post Call Metrics

![Post-call metrics list](https://files.buildwithfern.com/smallest-ai.docs.buildwithfern.com/66f9fbbfcd82f986a0e0df0908a4ed7399451366a54e5d519547efc20532b375/products/atoms/pages/platform/building-agents/images/post-call-metrics-list.png)

***

## How It Works

1. **You define metrics** — What questions do you want answered about each call?
2. **Call ends** — Conversation completes normally
3. **AI analyzes** — Atoms reviews the transcript against your metrics
4. **Data populated** — Your metrics get filled in automatically
5. **Access anywhere** — View in logs, receive via webhook, export

***

## Creating a New Metric

Click the **Add Metrics +** button to open the configuration panel. You'll see two options:

![Disposition metrics](https://files.buildwithfern.com/smallest-ai.docs.buildwithfern.com/791e02d0e141c3906141c1273aea1b593f511455bbd8d86cdbf645408005ec31/products/atoms/pages/platform/building-agents/images/post-call-disposition.png)

Build a custom metric from scratch. Fill in the Identifier, Data Type, and Prompt — see details below.

Use **Add Another +** to create multiple metrics at once.

Don't forget to hit **Save** in the Disposition tab once you're done.

![Metric templates](https://files.buildwithfern.com/smallest-ai.docs.buildwithfern.com/4d441cee87770d5de234643176c45172d84b7900e682b2ddaf4a15e33b324d57/products/atoms/pages/platform/building-agents/images/post-call-templates.png)

Choose from pre-built metrics for common use cases. Just select the ones you want — no manual configuration needed.

Don't forget to hit **Save** in the Disposition tab once you're done.

***

## Configuring a Metric

Each metric needs three things:

| Field          | Required | Description                                                        |
| -------------- | -------- | ------------------------------------------------------------------ |
| **Identifier** | Yes      | Unique name for this metric. Lowercase, numbers, underscores only. |
| **Data Type**  | Yes      | What kind of value: String, Number, or Boolean                     |
| **Prompt**     | Yes      | The question you want answered about the call                      |

### Identifier

This is the key used to reference the metric in exports, webhooks, and the API.

```
customer_satisfaction
call_outcome
follow_up_needed
```

**Naming rules:** Lowercase letters, numbers, and underscores only. No spaces or special characters.

### Data Type

| Type         | Use for               | Example values                           |
| ------------ | --------------------- | ---------------------------------------- |
| **String**   | Free text, categories | "resolved", "escalated", "billing issue" |
| **Boolean**  | Yes/no questions      | true, false                              |
| **Integer**  | Whole numbers, scores | 1, 5, 10                                 |
| **Enum**     | Fixed set of options  | One of: "low", "medium", "high"          |
| **Datetime** | Dates and times       | "2024-01-15T10:30:00Z"                   |

### Prompt

This is the question the AI answers by analyzing the transcript. Be specific.

**Good prompts:**

* "Did the agent acknowledge and respond to customer concerns effectively?"
* "Rate customer satisfaction from 1 to 5 based on tone and words used."
* "What was the primary reason for this call? Options: billing, technical, account, other"

**Vague prompts to avoid:**

* "Was it good?"
* "Customer happy?"

**Start with 3-5 metrics.** Too many can slow analysis and clutter your data. Add more as you learn what insights matter most.

***

## Example Metrics

| Field          | Value                                                                                                          |
| -------------- | -------------------------------------------------------------------------------------------------------------- |
| **Identifier** | `call_outcome`                                                                                                 |
| **Data Type**  | String                                                                                                         |
| **Prompt**     | "What was the outcome of this call? Options: resolved, escalated, transferred, abandoned, callback\_scheduled" |

| Field          | Value                                                                                                          |
| -------------- | -------------------------------------------------------------------------------------------------------------- |
| **Identifier** | `satisfaction_score`                                                                                           |
| **Data Type**  | Integer                                                                                                        |
| **Prompt**     | "Rate the customer's apparent satisfaction from 1 to 5, based on their tone and language throughout the call." |

| Field          | Value                                                        |
| -------------- | ------------------------------------------------------------ |
| **Identifier** | `follow_up_needed`                                           |
| **Data Type**  | Boolean                                                      |
| **Prompt**     | "Does this call require any follow-up action from the team?" |

| Field          | Value                                                                                                        |
| -------------- | ------------------------------------------------------------------------------------------------------------ |
| **Identifier** | `issue_category`                                                                                             |
| **Data Type**  | Enum                                                                                                         |
| **Prompt**     | "What was the primary issue category? Options: billing, technical, account, product\_info, complaint, other" |

***

## Configuring via API

Post-call metrics are set through the **agent versioning** flow: edit a draft's config, publish it as a new version, and activate the version. There is no standalone post-call-analytics endpoint — configuration lives on the agent's active version.

### Full flow

```python
import os
import requests

API_KEY = os.environ["SMALLEST_API_KEY"]
AGENT_ID = "YOUR_AGENT_ID"
BASE = "https://api.smallest.ai/atoms/v1"
HEADERS = {"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"}

# 1. Get the currently active version
agent = requests.get(f"{BASE}/agent/{AGENT_ID}", headers=HEADERS).json()
active_version_id = agent["data"]["activeVersionId"]

# 2. Create a draft from that version
draft = requests.post(
    f"{BASE}/agent/{AGENT_ID}/drafts",
    headers=HEADERS,
    json={"sourceVersionId": active_version_id, "draftName": "post-call-metrics-update"},
).json()
draft_id = draft["data"]["draftId"]

# 3. Write your post-call metrics config onto the draft
requests.patch(
    f"{BASE}/agent/{AGENT_ID}/drafts/{draft_id}/config",
    headers=HEADERS,
    json={
        "postCallAnalyticsConfig": {
            "dispositionMetrics": [
                {
                    "identifier": "call_resolved",
                    "dispositionMetricPrompt": "Was the customer issue resolved by the end of the call?",
                    "dispositionMetricType": "BOOLEAN",
                },
                {
                    "identifier": "satisfaction_score",
                    "dispositionMetricPrompt": "Rate the customer satisfaction from 1 to 5",
                    "dispositionMetricType": "INTEGER",
                },
                {
                    "identifier": "call_outcome",
                    "dispositionMetricPrompt": "What was the outcome of the call?",
                    "dispositionMetricType": "ENUM",
                    "choices": ["resolved", "escalated", "callback_scheduled", "no_action"],
                },
                {
                    "identifier": "summary",
                    "dispositionMetricPrompt": "Provide a brief summary of the call",
                    "dispositionMetricType": "STRING",
                },
            ],
            "useInternalAnalyticsModel": True,
            "useReasoningModel": False,
        }
    },
).raise_for_status()

# 4. Publish the draft as a new version and activate it
requests.post(
    f"{BASE}/agent/{AGENT_ID}/drafts/{draft_id}/publish",
    headers=HEADERS,
    json={"label": "Added post-call metrics", "activate": True},
).raise_for_status()
```

### Disposition metric schema

Each entry in `dispositionMetrics` takes four fields:

| Field                     | Required                 | Description                                                    |
| ------------------------- | ------------------------ | -------------------------------------------------------------- |
| `identifier`              | Yes                      | Machine name. Lowercase letters, digits, and underscores only. |
| `dispositionMetricPrompt` | Yes                      | The question evaluated against the transcript.                 |
| `dispositionMetricType`   | Yes                      | One of `STRING`, `BOOLEAN`, `INTEGER`, `ENUM`, `DATETIME`.     |
| `choices`                 | Only when type is `ENUM` | Allowed values.                                                |

Two analytics flags apply globally:

| Field                       | Default | Description                                                                            |
| --------------------------- | ------- | -------------------------------------------------------------------------------------- |
| `useInternalAnalyticsModel` | `true`  | Use the internal analytics model. When `false`, the agent's own LLM evaluates metrics. |
| `useReasoningModel`         | `false` | Route evaluation through the reasoning model — higher quality, higher latency/cost.    |

### Reading current metrics

```bash
curl -H "Authorization: Bearer $SMALLEST_API_KEY" \
  "https://api.smallest.ai/atoms/v1/agent/$AGENT_ID" \
  | jq '.data._resolvedConfig.postCallAnalyticsConfig'
```

The active version's metrics are surfaced under `_resolvedConfig.postCallAnalyticsConfig`. Each entry round-trips exactly as sent: `identifier`, `dispositionMetricPrompt`, `dispositionMetricType`, and `choices` (when the type is `ENUM`).

***

## Related

View metrics for individual calls

See aggregated trends across calls