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

# Call Flow

> Understand how calls progress in Simple AI

When a call is initiated, whether inbound or outbound, Simple AI follows a sequence of steps before, during, and after the conversation. This page walks through that flow and explains where your workflows can hook in.

## 1. Pre-call workflow

Before a call starts, Simple AI can run a pre-call workflow that prepares the agent with context about the caller. This is not just a simple HTTP ping — it is an opportunity to run a full sequence of lookups, business logic, and data enrichment so the agent starts the conversation fully informed.

If an agent has the `pre_call_webhook_url` configured and `pre_call_webhook_enabled` set to `true`, Simple AI triggers the workflow before the call is created. The payload includes information about the call and the agent:

```json theme={null}
{
  "call": {
    "from_number": "+15551234567",
    "to_number": "+15557654321",
    "direction": "inbound",
    "timestamp": "2024-01-01T12:00:00Z"
  },
  "agent": {
    "id": "agent-uuid",
    "name": "Support Agent"
  }
}
```

Your workflow can look up the caller in your CRM, check for open support tickets, load account details, apply routing rules, or run any other logic you need. It responds with a `parameters` object, and those parameters are merged into the call before it begins.

If `pre_call_webhook_auth_token` is present, it is sent in the `Authorization` header as a bearer token. The workflow times out after `pre_call_webhook_timeout` seconds (default is 5). Errors or timeouts are ignored and the call proceeds normally.

See [Workflows](/integrations/workflows) for detailed examples and setup guidance.

## 2. Call created

After the optional pre-call workflow, Simple AI creates the call record and connects the caller to the agent. At this point your application receives the `call.started` webhook (see [Webhooks](/webhooks)).

## 3. Call in progress

During the conversation, Simple AI can send `call.transcript_update` webhooks with incremental transcript data. These allow your application to react in real time — displaying a live transcript, monitoring for keywords, or triggering mid-call actions.

## 4. Call completed

When the call ends, Simple AI sends a `call.completed` webhook. This is the trigger for your post-call workflow — a full journey of follow-up actions like syncing to your CRM, sending follow-up messages, updating tickets, notifying your team, or feeding data into your analytics pipeline.

Post-call workflows can be as simple as a single API call or as complex as a multi-step orchestration that branches based on the call outcome, analyzer results, or tags. See [Workflows](/integrations/workflows) for examples.

## Summary

| Step               | What Happens                                  | Your Hook                                                                |
| ------------------ | --------------------------------------------- | ------------------------------------------------------------------------ |
| **Pre-call**       | Agent prepares for the conversation           | Pre-call workflow — enrich context, run business rules, load caller data |
| **Call started**   | Call is created and connected                 | `call.started` webhook                                                   |
| **In progress**    | Conversation is happening                     | `call.transcript_update` webhooks for real-time monitoring               |
| **Call completed** | Call ends, recording and transcript finalized | `call.completed` webhook — trigger your post-call workflow               |
