# Set up a Call Flow from Scratch

Starting from a blank canvas gives you complete control over a call flow. You decide which components to add, how they connect, and how callers move from one step to the next. Use this approach when no template fits, or when you want to design the routing logic entirely around your own requirements.

## Step 1. Create the call flow

1. Open the web portal and go to **Call Flow Designer**.
2. Click **Add**.

   
   ![Cloud Voice, the Call Flow Designer list with the Add button](/images/pbx/creation-page-cfd.png)

3. In the dialog that appears, fill in the details:

   - **Name**: A label that identifies this call flow.
   - **Remark**: An optional short description.
   - **Create Method**: Select **Start from Scratch**.

   ![Naming a new call flow and choosing the Start from Scratch method](/images/pbx/custom-cfd.png)

4. Click **Save**.

   Cloud Voice creates the flow and opens the configuration canvas.

:::note
Creating the flow only builds it. It will not answer or route any real calls until you finish designing it and switch it on in Step 3.
:::

## Step 2. Add and connect components

On the canvas, you assemble the flow from individual components and link them together in the order calls should follow.

:::tip
If you need to configure other phone-system features while you edit a component, click **Open in a new tab** in the top-right corner to keep working without leaving the designer.

![The Open in a new tab control in the top-right of the designer](/images/pbx/new-tab-cfd.png)
:::

1. Add a component using either method:

   - Click the add icon on an existing component, then pick the component to place after it.

     ![Adding a component directly from another component on the canvas](/images/pbx/add-component-cfd.png)

   - Click or drag a component from the toolbox on the left onto the canvas, then drag from the add icon to draw a connection between components.

     ![Dragging a component onto the canvas and wiring it to another](/images/pbx/connect-components.gif)

2. Click a component to open and edit its settings. The table below summarizes each available component and links to its full reference.

   | Component | What it does |
   | --- | --- |
   | [Initial Action](/pbx/call-flow-designer-guide/initial-action/) | The flow's entry point. Sets the number(s) callers dial to start the flow and can play an opening prompt to greet callers or give instructions. |
   | [Prompt](/pbx/call-flow-designer-guide/prompt/) | Plays one or more audio prompts, or a text-to-speech (TTS, speech generated from typed text) message, to the caller. |
   | [Business Hours](/pbx/call-flow-designer-guide/business-hours/) | Routes calls to different destinations depending on the time of day. |
   | [Menu](/pbx/call-flow-designer-guide/menu/) | Presents a set of options and routes the call based on the DTMF (Dual-Tone Multi-Frequency, the tones a phone keypad sends when a caller presses a key) digit the caller presses. |
   | [User Input](/pbx/call-flow-designer-guide/user-input/) | Collects DTMF digits from the caller, usually paired with a **Condition** component to evaluate the input and route accordingly. |
   | [Language](/pbx/call-flow-designer-guide/language/) | Changes the system-prompt language for the components that follow it in the flow. |
   | [Record](/pbx/call-flow-designer-guide/record/) | Starts recording once the caller connects to another party, with optional prompts announcing the recording. It can also switch recording off for calls that would otherwise be recorded. |
   | [Dial by Number](/pbx/call-flow-designer-guide/dial-by-number/) | Lets callers dial a number directly to reach their destination. |
   | [Dial by Name](/pbx/call-flow-designer-guide/dial-by-name/) | An end component that lets callers reach an extension user by typing the first three letters of the user's name. |
   | [Transfer](/pbx/call-flow-designer-guide/transfer/) | An end component that sends the caller to a chosen destination, optionally with a prompt announcing the transfer. |
   | [Hang Up Call](/pbx/call-flow-designer-guide/hang-up-call/) | An end component that disconnects the call when the caller reaches it. |
   | [Condition](/pbx/call-flow-designer-guide/condition/) | Routes calls according to logical expressions. |
   | [Loop](/pbx/call-flow-designer-guide/loop/) | Runs a group of components repeatedly, a set number of times or until a condition is satisfied. |
   | Internal Data Ops | Reads from and writes to the phone system's native database. See [Get Extension Presence Status](/pbx/call-flow-designer-guide/get-extension-presence-status/), [Set Extension Presence Status](/pbx/call-flow-designer-guide/set-extension-presence-status/), [Get Queue Agent](/pbx/call-flow-designer-guide/get-queue-agent/), [Get Queue Info](/pbx/call-flow-designer-guide/get-queue-info/), [Get Agent Status](/pbx/call-flow-designer-guide/get-agent-status/), [Set Agent Status](/pbx/call-flow-designer-guide/set-agent-status/), [Get System Info](/pbx/call-flow-designer-guide/get-system-info/), [Get System Capacity](/pbx/call-flow-designer-guide/get-system-capacity/), [Get Extension Info](/pbx/call-flow-designer-guide/get-extension-info/), and [Get Company Contact Info](/pbx/call-flow-designer-guide/get-company-contact-info/). |
   | [Email Sender](/pbx/call-flow-designer-guide/email-sender/) | Sends emails for real-time notifications, alerts, or delivering caller-specific information. |
   | [Database Access](/pbx/call-flow-designer-guide/database-access/) | Interacts with a database during the flow, running SQL (Structured Query Language, the standard language for querying databases) to read or update data as needed. |
   | [HTTP Request](/pbx/call-flow-designer-guide/http-request/) | Sends HTTP (Hypertext Transfer Protocol, the protocol web services use) requests to external servers so the flow can exchange data with third-party services. |

   :::note
   Every flow starts at an **Initial Action** component (the entry point) and finishes at an end component: **Dial by Name**, **Transfer**, or **Hang Up Call**. Make sure each path a caller can take reaches one of these, so no caller is left on a branch that goes nowhere.
   :::

3. When the flow is complete, click **Save** in the top-right corner.

   :::caution
   Edits stay on the canvas until you click **Save**. If you leave the designer without saving, your changes to the components and their connections are lost.
   :::

## Step 3. Enable the call flow

1. Back on the call flow list, toggle on the switch for the flow you built.

   ![Turning on the enable switch for a call flow in the list](/images/pbx/enable-template-call-flow.png)

2. Click **OK** to confirm.

   ![Confirming that the call flow should be enabled](/images/pbx/confirm-enable-cfd.png)

:::caution
Enabling a flow makes it live. Real calls to the number(s) set in its **Initial Action** are routed through it right away. Confirm the flow is finished and every branch ends properly before you switch it on, or callers may reach a dead end or be disconnected.
:::
