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

# Workflow Campaigns

> Several agents and steps, in the order you set: call, check what was said, wait, message on WhatsApp, update your systems

> [!NOTE]
>
> **Preview.** Workflow campaigns are being rolled out to pilot accounts. Ask your Osvi contact to turn them on.

A campaign runs in one of two ways:

* **Normal**: one agent takes the incoming calls and calls the batches you upload.
* **Workflow**: each contact goes through steps you lay out on a map. Call them with one agent, check what they said, wait a day, message them on WhatsApp, update your CRM, and finish with an outcome.

Choose **Workflow** under **Run with** when you create the campaign. A workflow campaign has a **Workflow** tab instead of **Agents**.

## Building a workflow

On the **Workflow** tab, **Edit workflow** opens the editor. Every contact begins at **Start**; add a block after it with **+**, and connect each of a block's paths to the next block. Each block is set up on its own card.

| Block | What it does | Paths |
| - | - | - |
| **Agent** | **Call**: one of your agents calls the contact, with its own retries if they don't answer. **Chat**: one of your chat agents messages them on WhatsApp and waits for a reply. | Next |
| **Conditional** | Checks what you know about the contact: a column of their batch, what an earlier agent found out, what an event brought. The first match whose rules all hold decides the path. | One per match, then **No match** |
| **Await** | Waits a set time, or until an **event** arrives from your systems (with a time limit). | Time: Next. Event: **Received** or **Timed out** |
| **Action** | Runs a tool from your [Tools library](/platform/tools.md) (update a CRM, send a webhook) with what the contact said. | Next, or **Didn't work** |
| **End** | Finishes the contact with an **outcome** (for example "Converted"), shown in Logs and counted on the Overview. | — |

**Which agents?** An Agent block can use any of your agents that isn't on another campaign or in a Journey. The campaign takes the agents its workflow uses when you publish it, and lets go of the ones it no longer uses.

**Information.** The editor's **Information** panel lists everything the blocks can check or pass on: the contact's columns, what each agent finds out (its call analysis fields, or a chat agent's tracked fields), and each event's fields.

**Things to fix.** The editor saves as you go and lists anything that keeps the workflow from running (a path that leads nowhere, an agent that is used elsewhere). Fix them before publishing.

### Callbacks

When a contact asks to be called back (the agent's call analysis must have callbacks on), the same Agent block calls them again at the time they asked for. They move on once a call ends without a new callback request, or after three callbacks on that block.

### Waiting for an event

An Await set to **Event** waits for your system to send that event for the contact through the [event API](/api-reference/endpoint/campaign_events.md). The block's **For your developer** link shows the exact request. An event that arrives before the contact reaches the block still counts.

## Trying it before it goes live

* **Try it** (in the editor): pick how a pretend contact answers each call, chat, action and event, and **Run**. The path they would take is shown on the map and in sentences. Nobody is called or messaged, and nothing is kept.
* **Test run**: runs the saved draft for real on your own phone number: your agents call or message you, and the panel follows each step. Actions are skipped in a test run, so nothing reaches your systems. On an Await waiting for an event, **Send test event** sends it.

## Publishing and versions

**Publish** makes the draft the live version. New contacts follow the live version; contacts already in the workflow finish on the version they started. **Versions** on the Workflow tab shows each published version's map.

## Running it

Upload a batch on the **Batches** tab (a CSV with `phone` and `person_name`; every other column can be used by the workflow) and start it. Each contact goes through the live workflow, inside the campaign's calling days and hours. **Pause** holds every contact where they are; **Resume** carries on. Archiving a campaign stops all its contacts for good.

* The **Workflow** tab's map shows how many contacts are at each block now. Click a count to see who.
* Each batch on the **Batches** tab shows how many contacts finished, are still going, stopped or failed.
* The **Overview** shows who is in the workflow now, who finished today, and the top outcomes.

## Logs

The **Logs** tab answers "what happened to Priya?". It lists every contact with where they are now, or how they finished, and filters by status, outcome, batch, the block they're at, date and name or number.

Open a contact to see their story: the path they took on the map, and each step in a sentence ("Called Priya: answered (2 min 10 s).", "Matched: Interested.", "Waiting until 16 Oct, 5:30 pm."), with the call's recording and transcript, or the chat. While they're still in the workflow you can **Stop** them, **Skip the wait** at an Await, or **Move on** by one of the block's paths.

On a Normal campaign, Logs lists every number the campaign called or that called it, with a **Missed incoming** filter.

Step details are kept for 90 days; after that, Logs still shows every step's sentence.


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