# Sub Flow

&#x20;"Sub Flow" organizes steps in the whole chatbot/flow.

### Create Sub Flow <a href="#create-sub-flow" id="create-sub-flow"></a>

Navigate "Flows" from the sidebar, click "+ New Sub Flow", choose a flow type, give a name and save.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FbVaS64Xg3ixfl5vgCgO0%2FCapture.PNG?alt=media&#x26;token=37fcf213-dacf-48fb-92d0-7d8e21b5b24a" alt=""><figcaption></figcaption></figure>

| Flow Type      | Description                                                |
| -------------- | ---------------------------------------------------------- |
| Normal Subflow | Varies in channels, basic subflow                          |
| Workflow       | work at the backend without influencing the front end task |
| Function Flow  | perform repetitive tasks                                   |

Click on the subflow to enter and start editing it. For more operations, click on the 3-dots icon. The **Sub Flow Ns** is a unique subflow ID in the chatbot.

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FqsLqlDkQnufFRVUXT3jf%2Fdownload%20(34).png?alt=media&#x26;token=43c0ea87-afae-424e-b423-b6f170c1a7e3" alt=""><figcaption></figcaption></figure></div>

Folders are used to organize subflows.

### Move Steps to Sub Flow <a href="#move-steps-to-sub-flow" id="move-steps-to-sub-flow"></a>

To move a step or multiple steps to another subflow, select the steps first, then you can either

* use the **Move to Subflow** button in the editing panel, or
* copy and paste them

To select multiple steps, hold the **Shift** key, click and drag to cover the steps.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F8mz2ecBUyG2h8DNHxLIW%2Fworkspace3.ce17a72e.png?alt=media&#x26;token=272bb201-a9ee-4298-a7b8-791974565c33" alt=""><figcaption></figcaption></figure>

Alternatively, hold **ctrl** key and click steps one by one:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FnoDatqtvRo8vygsHdFwZ%2Fworkspace4.58de402e.png?alt=media&#x26;token=105879d8-89d3-4974-9122-fb6d3f3a7003" alt=""><figcaption></figcaption></figure>

After selecting multiple steps, editing panel shows. "Select sub flow", then click "Move to sub flow".

{% hint style="info" %}
You will need to select at least 2 steps to create a canvas or move them to other sub flows. So if you have only 1 step to move or put in a canvas, try adding a temporary step to help and discard it after that.
{% endhint %}

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F39GO63zHPl1E8mv9lTtW%2Fsubflow1.ff69be06.png?alt=media&#x26;token=5e377fa3-8d17-4ea7-b5b1-e2fa2d7ee490" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
If you find yourself unable to click "Move to sub flow" after choosing a sub flow, perhaps you included the green **Start Step** in your selection. Because the green start point of any subflow can't be moved to other subflows. You can solve this issue by de-selecting the green start point.
{% endhint %}

To copy and paste, use **Ctrl + C** to copy the selected steps, then go to the destination subflow, use **Ctrl + V** to paste there.

### Call Sub Flow <a href="#call-sub-flow" id="call-sub-flow"></a>

After creating subflows, you can then call a subflow via:

* Goto Step
* Keyword
* Sequence
* Broadcast
* Facebook Widget
* Comment Growth Tool
* Triggers
* Live Chat
* Menu Items
* Inbound Webhooks
* API call
