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

# Pre- and post-call functions

> Calls the agent makes into your systems before dialing and after the conversation: when they run, the Pipeline view, and where everything is documented.

# Pre- and post-call functions

A call function is a request the agent makes into your system **around** the conversation, not inside it. There are exactly two points:

* **before the call** — the result lands in dynamic variables, so the agent knows it from its first word;
* **after the call** — once at finalization, with the final variables, the call summary, and the post-call analysis result.

Both lists live in the agent document and are versioned with it: a live call reads them from the published version, an editor test reads them from the draft.

<Note>
  **There are no "during the conversation" functions here.** Anything the agent needs to ask mid-dialogue is done by flow nodes on the canvas — Function, Code, and MCP Tool. This page covers only what happens before the first word and after the last one.
</Note>

## What this is for

**Before the call.** A campaign dials debtors. Before dialing, the agent looks up the name and the amount in billing. The person picks up and immediately hears: "Hello Alice, your balance for August is 12,400 tenge." Without this the agent would either stay silent for a few seconds while the request runs, or speak impersonally.

**After the call.** The conversation is over. The agent closes the ticket in the CRM, sends a summary to the manager in a messenger, and creates a task for an operator — but only if the call was actually successful.

## When exactly they run

When the "before the call" block runs depends on the direction.

| Direction                               | When                                          | Block budget     |
| --------------------------------------- | --------------------------------------------- | ---------------- |
| Outbound: campaign, cabinet, public API | **before dialing**, before the INVITE is sent | 60 s             |
| Inbound, web call                       | after connect, before the first reply         | 10 s             |
| Chat test in the editor                 | before the test session starts                | 10 s             |
| The "after the call" block              | at finalization, after post-call analysis     | no shared budget |

The gap between 60 and 10 seconds is not arbitrary. On an outbound call the request runs **before the number is dialed**: the phone is not ringing yet, there is no silence on the line, so there is more time. On an inbound call the person is already on the line waiting — every extra second of silence is audible.

The budget is shared by the whole block, not per function. A single function still cannot wait longer than **30 seconds**, whatever the budget.

## The Pipeline view

Open the agent in the builder. In the header, under **Editor view**, there are two buttons: **Dialog** and **Pipeline**. Click **Pipeline**.

Instead of the dialogue canvas you get a single top-to-bottom column with the heading "Call pipeline · agent name". The side panels are hidden when you enter this view — that is normal, they are not gone: the inspector opens when you select a function card, and the left panel opens from a configure button, from the error counter, or from the header toggle. Switching back to **Dialog** restores the panels as they were.

The selected view is stored in the page address (`?view=pipeline`), so it survives a reload and the link can be shared in a ticket.

<img src="https://mintcdn.com/hubtalk/9ArMFeq_K4HZh-Td/images/v4_pipeline_view_switch_en.png?fit=max&auto=format&n=9ArMFeq_K4HZh-Td&q=85&s=7c02df9a577c8b675f014bf3d5d27275" alt="Editor header with the Dialogue / Pipeline switch" width="1346" height="88" data-path="images/v4_pipeline_view_switch_en.png" />

The six blocks of the column, top to bottom:

| Block                   | What it shows                                                                                                                 |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| **Entry**               | three channels — inbound call, campaign call, web call — and the budget line "Before the first reply: 10 s / 60 s (campaign)" |
| **Pre-call functions**  | cards of the functions that run before the conversation                                                                       |
| **Agent**               | flow name, number of nodes, knowledge bases, tools, and MCP servers                                                           |
| **Post-analytics**      | what the system will compute for the conversation: summary, sentiment, success, model                                         |
| **Post-call functions** | cards of the functions that run after the conversation                                                                        |
| **Exit**                | webhooks that will receive call notifications                                                                                 |

The connectors between blocks are labeled: **"Call started"** before the agent and **"Call ended"** after it.

<img src="https://mintcdn.com/hubtalk/9ArMFeq_K4HZh-Td/images/v4_pipeline_view_en.png?fit=max&auto=format&n=9ArMFeq_K4HZh-Td&q=85&s=b9befcd3d9c410545c5925c5e741f5d6" alt="The Pipeline view: six blocks top to bottom" width="881" height="1976" data-path="images/v4_pipeline_view_en.png" />

Only two blocks are editable in the pipeline — pre-call functions and post-call functions. The other four show settings and never duplicate their forms:

* **Post-analytics** and **Exit** carry the buttons **Configure post-analytics** and **Configure webhooks**, which open the **Settings** tab; the target section is highlighted for a few seconds so it is clear where you were taken.
* **Agent** is itself a button: clicking the card opens the Dialog view ("Click to open the dialogue map").
* **Entry** is a reference block with no actions; each channel carries a "?" hint explaining what that channel is.

<img src="https://mintcdn.com/hubtalk/9ArMFeq_K4HZh-Td/images/v4_pipeline_entry_block_en.png?fit=max&auto=format&n=9ArMFeq_K4HZh-Td&q=85&s=a77c3d711d3fd66238881428a9b48728" alt="The Entry block: three channels and the budget line" width="441" height="205" data-path="images/v4_pipeline_entry_block_en.png" />

## Where everything is documented

<CardGroup cols={2}>
  <Card title="Pre-call functions" icon="arrow-right-to-bracket" href="/v4/platform/call-functions/before">
    Custom and code functions, result variables, row ordering and parallelism, trial runs and late delivery.
  </Card>

  <Card title="Post-call functions" icon="arrow-right-from-bracket" href="/v4/platform/call-functions/after">
    The run condition, the `call` and `analysis` variables, waiting for post-call analysis, and testing a condition without a call.
  </Card>

  <Card title="Dial decisions in a campaign" icon="phone-slash" href="/v4/platform/call-functions/campaign-decision">
    How a function cancels a dial or defers a contact before the phone ever rings, and what that does to the attempt.
  </Card>

  <Card title="The integration contract" icon="code" href="/v4/platform/call-functions/contract">
    What the platform sends, what it expects back, how the mapping works and which configuration keys exist.
  </Card>

  <Card title="History, limitations and troubleshooting" icon="stethoscope" href="/v4/platform/call-functions/diagnostics">
    What the call event feed shows, what the mechanism does not do, and what each symptom means.
  </Card>
</CardGroup>
