---
title: "Dialogs & Context"
description: "Build conversational dialogs with context variables and webhooks."
canonical: "https://docs.cm.com/conversational-ai/dialogs"
---

# Dialogs & Context

> Build conversational dialogs with context variables and webhooks.

Source: https://docs.cm.com/conversational-ai/dialogs

Build conversational flows using dialogs, context variables, and **webhooks**. Dialogs define how your bot understands and responds to user input.

## What is a dialog?

A **dialog** is a conversation building block. It consists of:

- **Triggers** — keywords or intents that activate the dialog (e.g., "order status", "track my package")
- **Response** — what the bot says when the dialog is triggered
- **Context variables** — data collected during the conversation (e.g., order number, email address)

## Key concepts

| Concept | Description |
| - | - |
| **Dialogs** | Conversation building blocks that match user intent |
| **Context variables** | Store and pass data between dialog turns |
| **Transactional dialogs** | Perform actions (e.g., API calls) during conversation |
| **Validation webhooks** | Validate user input in real-time |
| **Language support** | Multi-language conversations |

## Context variable webhooks

Enrich conversations by fetching external data via webhooks when context variables are set. For example, when a user provides their order number, fetch the order details from your system:

```json
{
  "webhook_url": "https://yourapi.com/orders/lookup",
  "variable": "order_number",
  "method": "POST"
}
```

## Transactional dialogs

Execute business logic during conversations — look up orders, check availability, or create bookings. Transactional dialogs call your API and use the response to continue the conversation.
