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

# Call Flows

> Build the script your AI agent follows during a call. Learn how to use templates, write step-based prompts, connect actions, and test your agent in PulsyAI.

The Call Flows tab is where you build the script your AI agent follows during a conversation. It is the most important part of any agent — it defines what the agent says, what it asks, what information it collects, and what actions it triggers.

To open it, select an assistant and click the **Call flows** tab.

<img src="https://mintcdn.com/pulsyai/CaYSbO98ULvsHT9Y/images/call-flows/01-call-flows-tab.png?fit=max&auto=format&n=CaYSbO98ULvsHT9Y&q=85&s=e5fc4186711906a962bbb6959ffb0807" alt="Call Flows tab" width="1917" height="944" data-path="images/call-flows/01-call-flows-tab.png" />

## How a Call Flow Works

A call flow is a script written as a series of steps. Each step represents a phase of the conversation — a greeting, a qualification question, a data collection moment, a booking attempt, or a closing.

You write the script in the **Prompt** box. For best results, give each step one clear objective. Agents perform far better with focused, single-purpose steps than with long, multi-purpose instructions.

<Note>
  To see how we build scripts for our own clients, check out the pre-built templates directly in the platform. Click **Use a Template** in the Call Flows tab — you'll find a library of ready-made scripts covering several different niches and industries, which you can use as a starting point and customize to your needs.

  <img src="https://mintcdn.com/pulsyai/CaYSbO98ULvsHT9Y/images/call-flows/02-use-template.png?fit=max&auto=format&n=CaYSbO98ULvsHT9Y&q=85&s=69d5de378311c5071780068f730341c5" alt="Use a Template — pre-built scripts library" width="1916" height="943" data-path="images/call-flows/02-use-template.png" />
</Note>

## Starting a Call Flow

You have two ways to create a call flow.

<CardGroup cols={2}>
  <Card title="Use a Template" icon="layer-group">
    Start from a pre-built, field-tested script for a common industry, then customize it to your needs.
  </Card>

  <Card title="Ask Copilot (Coming soon)" icon="wand-magic-sparkles">
    Coming soon — let the built-in Copilot generate a call flow for you based on a description of your business.

    <img src="https://mintcdn.com/pulsyai/CaYSbO98ULvsHT9Y/images/call-flows/03-ask-copilot.png?fit=max&auto=format&n=CaYSbO98ULvsHT9Y&q=85&s=57262ac7d2e784cba2342e35de9e7139" alt="Ask Copilot — coming soon" width="1917" height="944" data-path="images/call-flows/03-ask-copilot.png" />
  </Card>
</CardGroup>

### Writing the Prompt

The Prompt box is where the script lives. Write the conversation the way you want the agent to handle it — the greeting, how it responds to different caller needs, the questions it asks, and how it closes.

A clear call flow follows a natural structure: greeting, identifying the caller's need, qualifying with questions, providing a solution, collecting contact information, and closing.

<img src="https://mintcdn.com/pulsyai/CaYSbO98ULvsHT9Y/images/call-flows/04-prompt-box.png?fit=max&auto=format&n=CaYSbO98ULvsHT9Y&q=85&s=9e66a1b20ead8ee44745c09aaecae5dc" alt="Call flow prompt box" width="1918" height="945" data-path="images/call-flows/04-prompt-box.png" />

## Setting Up a Step

The **Set up your step** panel controls what happens within a specific step of the call flow.

### Booking in a Step

The checkbox **"Should the agent book a meeting in this step?"** enables appointment booking for that step. Check it on any step where the agent should schedule a meeting.

<img src="https://mintcdn.com/pulsyai/CaYSbO98ULvsHT9Y/images/call-flows/05-booking-step.png?fit=max&auto=format&n=CaYSbO98ULvsHT9Y&q=85&s=98356e47c5ec22f57a611e2658b1b5e6" alt="Booking in a step" width="1917" height="945" data-path="images/call-flows/05-booking-step.png" />

When the booking checkbox is enabled, your step prompt should clearly instruct the agent to use the booking functions and confirm the appointment. Here is an example of a well-structured booking prompt:

```text theme={null}
For the free quote, our estimator will come see the project on site. Do you have a date in mind, or would you like me to suggest the next available slot?
[PAUSE FOR RESPONSE]

--- TECHNICAL DIRECTIVES — USING FUNCTIONS ---
CRITICAL RULES:
- NEVER invent availability
- ALWAYS use the functions to get real time slots
- This call is for the REPRESENTATIVE to contact the client BY PHONE
- When mentioning times, always say "ten o'clock", "two o'clock", "nine thirty" — never "10am", "10:00", or digits

AVAILABLE FUNCTIONS:
1. isDateAvailable(date) — Checks if a specific date is available
2. getAvailabilityForRange(start_date, end_date) — Gets all available slots in a period
3. fetchEarliestAvailability() — Gets the closest next availability
4. confirm_booking(date, time, details) — Confirms and saves the appointment (MANDATORY)

CONVERSATION FLOW:
IF THE CLIENT SUGGESTS A DATE:
  [ACTION 1] Call isDateAvailable(date)
  IF AVAILABLE:
    [ACTION 2] Call getAvailabilityForRange(date, date) to get time slots
    Agent: Offer the available slots naturally and ask which time works.
    [Pause — wait for client response]
    IF THE CLIENT ACCEPTS A TIME:
      [ACTION 3] Call confirm_booking(date, time, details)
      Agent: "Excellent! I confirm that our representative will contact you on {DAY} at {TIME}."
  IF NOT AVAILABLE:
    [ACTION 2] Call fetchEarliestAvailability()
    Agent: "Unfortunately, I have no availability that day. The next opening is {DATE} at {TIME}. Would that work?"
    [Pause]
    IF YES: Call confirm_booking(date, time, details) → Confirm
    IF NO: Call getAvailabilityForRange(start, end) → Offer other options

IF THE CLIENT WANTS THE EARLIEST DATE:
  [ACTION 1] Immediately call fetchEarliestAvailability()
  Agent: "Perfect! The next availability is {DATE} at {TIME}. Does that work for you?"
  [Pause]
  IF YES: Call confirm_booking(date, time, details) → Confirm
  IF NO: Call getAvailabilityForRange(start, end) → Offer other options

APPOINTMENT CONFIRMATION:
[Once the appointment is confirmed via the function]
Agent: "Excellent! I confirm that our representative will call you on {DAY} at {TIME}."
Agent: "You will receive an email confirmation with all the details."
```

<Tip>
  For booking and any function-calling steps, use a more capable AI model such as GPT-4.1. Smarter models hallucinate far less and follow function-calling instructions more reliably.
</Tip>

<Tip>
  Before any function call, the agent should always ask the user a yes/no question first — for example, "Do you have a date in mind, or would you like me to suggest the next available slot?" Function calls work much more reliably when the agent has a clear confirmation from the user before triggering them.
</Tip>

### Connecting Actions

The **Actions** section links the actions you created in the [Integrations](/platform/integrations) tab to a specific step in the call flow.

Click **+ Connect Action** and select an action — such as a Cal.com booking or a notification — to attach it to the current step. An action only runs if it is connected here. Configuring an integration alone is not enough; it must be connected as an action in the call flow to actually trigger.

<img src="https://mintcdn.com/pulsyai/CaYSbO98ULvsHT9Y/images/call-flows/06-connect-action.png?fit=max&auto=format&n=CaYSbO98ULvsHT9Y&q=85&s=c97fa898cfe141a1359d7eceb0a4e6ea" alt="Connect Action" width="1919" height="945" data-path="images/call-flows/06-connect-action.png" />

A modal will open — select your integration and click **Connect** to attach it to the step.

<img src="https://mintcdn.com/pulsyai/CaYSbO98ULvsHT9Y/images/call-flows/07-select-integration.png?fit=max&auto=format&n=CaYSbO98ULvsHT9Y&q=85&s=7075b97d6a69ca5b28a270808c086448" alt="Select integration and connect" width="1835" height="850" data-path="images/call-flows/07-select-integration.png" />

## Testing Your Call Flow

Before going live, test your agent. PulsyAI offers two testing options.

<CardGroup cols={2}>
  <Card title="Test Chatbot" icon="comment">
    Test the call flow quickly through text chat. No call minutes are used. Best for fast iteration once you are familiar with the platform.

    <img src="https://mintcdn.com/pulsyai/CaYSbO98ULvsHT9Y/images/call-flows/08-test-chatbot.png?fit=max&auto=format&n=CaYSbO98ULvsHT9Y&q=85&s=0ae2c236f02855d427abac00226ed677" alt="Test Chatbot" width="163" height="96" data-path="images/call-flows/08-test-chatbot.png" />
  </Card>

  <Card title="Test AI" icon="phone">
    Place a real test call with full voice. Lets you hear the voice quality, pacing, and latency. Recommended for new users and for final validation before going live.

    <img src="https://mintcdn.com/pulsyai/CaYSbO98ULvsHT9Y/images/call-flows/09-test-ai.png?fit=max&auto=format&n=CaYSbO98ULvsHT9Y&q=85&s=d6a5c1d31d40557a5c619c2c0bd6d0c8" alt="Test AI" width="110" height="99" data-path="images/call-flows/09-test-ai.png" />
  </Card>
</CardGroup>

When your call flow is ready, click **Save all** to save your work.

<img src="https://mintcdn.com/pulsyai/CaYSbO98ULvsHT9Y/images/call-flows/10-save-all.png?fit=max&auto=format&n=CaYSbO98ULvsHT9Y&q=85&s=d2530b6672c7cc3b8b31d130141d5741" alt="Save all" width="1918" height="945" data-path="images/call-flows/10-save-all.png" />

<Note>
  Your agent needs a phone number connected to receive or place calls. See the [Phone Numbers](/platform/phone-numbers) page to add and connect one.
</Note>

## Next Steps

<CardGroup cols={2}>
  <Card title="Agent Settings" icon="sliders" href="/platform/agent-settings">
    Configure voice, latency, language, and other global settings for your agent.
  </Card>

  <Card title="Integrations" icon="plug" href="/platform/integrations">
    Create the actions you can connect to your call flow steps.
  </Card>
</CardGroup>
