> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nedzo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Conversation ended trigger

> Trigger a workflow when an AI conversation ends — voice calls, chat on any messaging channel, or web agent sessions. Access transcript and summary.

Fires when any AI conversation ends — voice calls, chat conversations on any connected messaging channel, or web agent sessions. This is one of the most powerful triggers — it gives you access to the full conversation data including transcript, summary, outcome, and any extracted fields.

> [!NOTE]
>
> This trigger was previously called **Call Completed** (voice-only) and **Conversation Completed**. Existing workflows continue to work unchanged. The internal type identifier is still `conversationCompleted`.

## When it fires

The trigger fires immediately after a conversation ends:

| Agent type | Fires after |
| - | - |
| Voice | A phone call ends, regardless of outcome (answered, voicemail, no answer, or failed). Both inbound and outbound. |
| Chat | An SMS, WhatsApp, Instagram DM, Messenger, email, or web chat conversation is finalized. |
| Web | A web agent session (voice or chat widget embedded on your site) ends. |

## Configuration

### Filters

Use filters to only trigger the workflow for specific conversations. All filters use AND logic.

| Filter field | Options | Description |
| - | - | - |
| Agent Type | voice, chat, web (multi-select) | Only fire for the selected agent types. Leave empty to fire for all types. |
| AI Agent | Select agents | Only fire for conversations handled by specific agents |
| Call direction | Inbound, Outbound | **Voice only.** Only fire for calls in a specific direction |
| Outcome | One of the fixed [Outcomes](https://docs.nedzo.ai/agents/call-analysis.md#outcome), with `is` / `is not` | Match against the conversation's Outcome. Case-insensitive. |
| Min duration | Number (seconds) | **Voice only.** Only fire if the call lasted at least this long |
| Max duration | Number (seconds) | **Voice only.** Only fire if the call was shorter than this |
| Extracted data | Free-text per extraction field with `equals` / `not equals` / `contains` / `not contains` / `is empty` / `is not empty` / `greater than` / `less than` operators | Match against any extraction field configured on the agent (budget, lead status, appointment date, etc.). Available across voice, chat, and web. See [Extracted data filters](#extracted-data-filters) below. |

> [!NOTE]
>
> Voice-only filters (direction, duration) only apply when Agent Type includes voice. If you select only `chat` or `web`, those filters are ignored. The Outcome and Extracted data filters work on every channel.

### Outcome

Every conversation is classified into one [Outcome](https://docs.nedzo.ai/agents/call-analysis.md#outcome) from a fixed list (`Appointment booked`, `Booking failed`, `Transferred`, `No answer`, `Voicemail`, `Follow up`, `Callback requested`, `Not interested`, `Disqualified`, `Do not disturb`, `Wrong number`, `Other`). The filter is a dropdown of those values.

| Operator | Behavior |
| - | - |
| `is` | Exact match, case-insensitive |
| `is not` | Negated exact match, case-insensitive |

> [!NOTE]
>
> This filter was previously called **Call disposition** and took free text. Filters saved before the rename are still evaluated as they were saved, but they now match against the fixed Outcome list:
>
> * A filter with no operator and a legacy value such as `completed` or `appointment_booked` still matches the conversation's stored call result.
>
> * Every other saved filter, including `contains` and custom labels such as `Interested` or `Hot Lead`, is compared with the conversation's Outcome. It only matches when its value fits one of the fixed Outcomes (case-insensitive; `contains` matches part of the Outcome).
>
> * A filter saved with `Do not call` matches `Do not disturb`.
>
> * `Positive` is no longer an outcome, so a filter on `Positive` stops matching new conversations.
>
> Open older workflows that filter on Outcome and pick a value from the list, so they keep firing.

For voice-specific routing on raw call ending reasons (voicemail, no answer, transferred, etc.), use a [Condition](https://docs.nedzo.ai/workflows/actions/condition.md) step on `{{trigger.conversation.endedReason}}` — see the voice-only fields table further down.

### Extracted data filters

Filter on any extraction field configured on the agent — budget, lead status, appointment date, sentiment, anything you've set up. The filter picker shows every extraction field defined on the agents your workflow listens to, and works across voice, chat, and web conversations.

| Operator | Behavior |
| - | - |
| `equals` / `not equals` | Exact match, case-insensitive. Booleans and numbers are compared as strings (`true`, `42`). |
| `contains` / `not contains` | Substring match, case-insensitive. |
| `is empty` / `is not empty` | Matches when the AI didn't extract a value (missing key, null, empty string, empty array, or empty object). |
| `greater than` / `less than` | Numeric comparison. Both sides must be numeric — non-numeric values never match. |

Behavior notes:

* Filtering only fires the workflow when the field matches. Filters are AND-combined — every filter must match.
* `not equals` and `not contains` against a missing value match (vacuous truth) — useful for "fire unless the AI said X".
* Extracted values are also available as variables in your actions — see [`{{trigger.conversation.metadata.fieldName}}`](#conversation-variables) further down.

### Examples

**Only outbound voice calls that booked an appointment:**

* Filter: Agent Type → voice
* Filter: Call direction → Outbound
* Filter: Outcome → `is` `Appointment booked`

**All chat conversations from a specific agent:**

* Filter: Agent Type → chat
* Filter: AI Agent → Select your support agent

**Voice or web sessions longer than 30 seconds:**

* Filter: Agent Type → voice, web
* Filter: Min duration → 30

**Every conversation on every channel:**

* No filters. Leave it empty.

**Hot leads only (any channel):**

* Filter: Extracted data → `lead_status` `contains` `hot`

**Conversations where appointment date was captured:**

* Filter: Extracted data → `appointment_date` `is not empty`

**High-budget leads:**

* Filter: Extracted data → `budget` `greater than` `5000`

## Data available

This trigger provides the richest data of any trigger type. Some fields are only present for certain agent types — use the Agent Type filter or a Condition step to branch safely.

### Contact variables

Available for every conversation regardless of channel.

| Variable | Legacy alias | Description | Example |
| - | - | - | - |
| `{{contact.contactId}}` | `{{contactId}}` | The contact's ID | `a1b2c3d4-...` |
| `{{contact.firstName}}` | `{{firstName}}` | Contact's first name | `John` |
| `{{contact.lastName}}` | `{{lastName}}` | Contact's last name | `Doe` |
| `{{contact.phone}}` | `{{phone}}` | Contact's phone number | `+14155551234` |
| `{{contact.email}}` | `{{email}}` | Contact's email | `john@example.com` |

> [!NOTE]
>
> Dot notation (`{{contact.firstName}}`) is now the standard. The flat aliases on the right still work for backwards compatibility — existing workflows continue to render unchanged.

### Conversation variables

The canonical namespace for all channels. Use these in new workflows.

| Variable | Description | Example |
| - | - | - |
| `{{trigger.conversation.conversationId}}` | Unique conversation ID | `0a9b8c7d-...` |
| `{{trigger.conversation.channel}}` | Channel the conversation happened on | `voice`, `sms`, `whatsapp`, `instagram`, `messenger`, `email`, `web_chat`, `web` |
| `{{trigger.conversation.agentType}}` | Deprecated. Agents no longer carry a type, so this renders empty on voice conversations. Use `{{trigger.conversation.channel}}` instead. | *(empty)* |
| `{{trigger.conversation.agentId}}` | Agent that handled the conversation | `x1y2z3-...` |
| `{{trigger.conversation.agentName}}` | Agent's name | `Sales Agent` |
| `{{trigger.conversation.startedAt}}` | When it started (ISO 8601) | `2026-04-23T14:30:00Z` |
| `{{trigger.conversation.endedAt}}` | When it ended (ISO 8601) | `2026-04-23T14:34:05Z` |
| `{{trigger.conversation.summary}}` | AI-generated summary | `Discussed pricing...` |
| `{{trigger.conversation.transcript}}` | Full transcript (text-channel lines are timestamp-prefixed in the workspace timezone, e.g. `[2026-06-15 14:23:07] User: Hi...`; voice/web lines are not) | `[2026-06-15 14:23:07] User: Hi...` |
| `{{trigger.call.analysis.outcome}}` or `{{trigger.call.analysis.disposition}}` | The conversation's [Outcome](https://docs.nedzo.ai/agents/call-analysis.md#outcome). Picking **Outcome** in the variable picker inserts `{{trigger.call.analysis.outcome}}`. `{{trigger.call.analysis.disposition}}` is an old name for the same value. It still works for now, but use `outcome` in new workflows. | `Appointment booked` |
| `{{trigger.conversation.metadata}}` | Custom extraction fields | `{"budget": "5000"}` |

Extraction fields configured on the agent (budget, timeline, etc.) are available under `{{trigger.conversation.metadata.fieldName}}`.

### Voice-only fields

Present when `agentType` is `voice`.

| Variable | Description | Example |
| - | - | - |
| `{{trigger.conversation.callId}}` | Voice Engine call ID | `c1d2e3f4-...` |
| `{{trigger.conversation.duration}}` | Call length in seconds | `245` |
| `{{trigger.conversation.direction}}` | Inbound or outbound | `outbound` |
| `{{trigger.conversation.endedReason}}` | Raw reason the call ended | `customer-ended-call` |

> [!NOTE]
>
> Use `{{trigger.call.analysis.outcome}}` for the conversation's Outcome, or `{{trigger.conversation.endedReason}}` for the raw call ending reason.

### Appointment variables

Present when the agent's booking tool confirmed an appointment during the conversation, and empty otherwise. These live under `{{trigger.call.*}}`.

| Variable | Description | Example |
| - | - | - |
| `{{trigger.call.appointmentDateFormatted}}` | Appointment date, in your workspace timezone | `Sep 10, 2026` |
| `{{trigger.call.appointmentTime}}` | Appointment time, in your workspace timezone | `6:00 PM` |
| `{{trigger.call.appointmentDate}}` | Appointment date and time as an ISO 8601 UTC timestamp | `2026-09-10T22:00:00+00:00` |

Use the first two in emails, SMS and Slack messages, e.g. `Appointment: {{trigger.call.appointmentDateFormatted}} at {{trigger.call.appointmentTime}}`. Use the ISO value where another system or field needs a machine-readable date: webhook bodies, date-type contact fields, and `greater than` / `less than` conditions. If a workspace hasn't set a timezone, `appointmentDateFormatted` and `appointmentTime` render empty — there's no silent UTC fallback.

### Chat-only fields

Present when `agentType` is `chat`.

| Variable | Description | Example |
| - | - | - |
| `{{trigger.conversation.messageCount}}` | Number of messages exchanged | `8` |
| `{{trigger.conversation.lastMessageAt}}` | Timestamp of the final message (ISO 8601) | `2026-04-23T14:45:00Z` |

Chat conversations do not include `direction` or `duration` — use the Outcome and timestamps instead.

### Web-only fields

Present when `agentType` is `web`. Web sessions use the voice-style fields (`callId`, `duration`, `endedReason`) plus `channel: "web"`.

### Legacy `trigger.call.*` namespace

For backwards compatibility, existing voice workflows can still use the `{{trigger.call.*}}` namespace. It maps 1:1 to `{{trigger.conversation.*}}` for voice-only fields (`callId`, `duration`, `direction`, `summary`, `transcript`, `agentId`, `agentName`, `agentType`, `startedAt`, `endedAt`, `endedReason`, `metadata`). New workflows should use `{{trigger.conversation.*}}` since the legacy namespace only resolves for voice conversations.

`{{trigger.call.agentType}}` renders empty, the same as its `{{trigger.conversation.*}}` counterpart. Agents no longer carry a type.

## Deduplication

Uses the conversation ID as the dedup key. Default window: 1 minute. Each conversation can only trigger the workflow once within the window.

## Use case examples

### Follow-up based on voice outcome

Different outcomes get different follow-up strategies.

1. **Trigger:** Conversation ended → Agent Type: voice
2. **Action:** [Condition](https://docs.nedzo.ai/workflows/actions/condition.md) — Check **Outcome** (Trigger)
   * **Path: is `Follow up`**
     * [Send email](https://docs.nedzo.ai/workflows/actions/send-email.md) — *"Hi `{{firstName}}`, great chatting! Here are the details we discussed..."*
     * [Update contact](https://docs.nedzo.ai/workflows/actions/update-contact.md) — Add "interested" tag
   * **Path: is `Voicemail`**
     * [Wait](https://docs.nedzo.ai/workflows/actions/wait.md) — 4 hours
     * [Voice call](https://docs.nedzo.ai/workflows/actions/voice-call.md) — Retry
   * **Path: is `No answer`**
     * [Send SMS](https://docs.nedzo.ai/workflows/actions/send-sms.md) — *"Hi `{{firstName}}`, I just tried to reach you. Let me know a good time."*
   * **Default**
     * [Update contact](https://docs.nedzo.ai/workflows/actions/update-contact.md) — Add "needs-review" tag

### Post SMS summary to Slack

Every finalized SMS conversation gets a summary posted to your team channel.

1. **Trigger:** Conversation ended → Agent Type: chat
2. **Action:** [Condition](https://docs.nedzo.ai/workflows/actions/condition.md) — `{{trigger.conversation.channel}}` equals `sms`
3. **Action:** [Slack message](https://docs.nedzo.ai/workflows/actions/slack-message.md) — #sms-conversations
   * Message: *"SMS with `{{firstName}}` `{{lastName}}` (`{{trigger.conversation.messageCount}}` messages, `{{trigger.call.analysis.outcome}}`)\n\n`{{trigger.conversation.summary}}`"*

### Post-call summary to Slack

Every completed voice call gets a summary posted to your team channel.

1. **Trigger:** Conversation ended → Agent Type: voice
2. **Action:** [Slack message](https://docs.nedzo.ai/workflows/actions/slack-message.md) — #call-updates
   * Message: *"Call with `{{firstName}}` `{{lastName}}` (`{{trigger.conversation.duration}}`s, `{{trigger.call.analysis.outcome}}`)\n\n`{{trigger.conversation.summary}}`"*

### Sync conversation data to CRM

Push conversation details to your CRM after every conversation, regardless of channel.

1. **Trigger:** Conversation ended (no filters)
2. **Action:** [Send webhook](https://docs.nedzo.ai/workflows/actions/send-webhook.md) — POST to CRM
   ```json theme={null}
   {
     "contact": "{{firstName}} {{lastName}}",
     "phone": "{{phone}}",
     "channel": "{{trigger.conversation.channel}}",
     "agentType": "{{trigger.conversation.agentType}}",
     "outcome": "{{trigger.call.analysis.outcome}}",
     "summary": "{{trigger.conversation.summary}}",
     "agent": "{{trigger.conversation.agentName}}"
   }
   ```

### Do Not Disturb compliance

A conversation whose outcome is `Do not disturb` (the contact asked not to be contacted) turns on Do Not Disturb (DND) for that contact automatically, on every channel: calls, chat, SMS, email and the rest. Nothing more is sent to them. A `Not interested` outcome does not turn on DND. Use a workflow to tell your team.

1. **Trigger:** Conversation ended → Outcome: `is` `Do not disturb`
2. **Action:** [Slack message](https://docs.nedzo.ai/workflows/actions/slack-message.md) to #compliance
   * Message: *"`{{firstName}}` `{{lastName}}` (`{{phone}}`) asked not to be contacted. Do Not Disturb is now on."*

### Tag engaged web visitors

When a web agent session finishes with a Follow up outcome, mark the contact as engaged.

1. **Trigger:** Conversation ended → Agent Type: web
2. **Action:** [Condition](https://docs.nedzo.ai/workflows/actions/condition.md) — **Outcome** (Trigger) is `Follow up`
3. **Action:** [Update contact](https://docs.nedzo.ai/workflows/actions/update-contact.md) — Add "engaged-web" tag


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.