Skip to content

Subflows vs Triggered Flows

A Subflow is a part of the main Flow that can be triggered by both the main Flow itself and another Subflow. In this case, Subflows are part of the main Flow with no cold start (1).

Triggered Flows are separate Flows, they have a cold start, meaning they need more time to start their execution. They are created with the help of the Trigger Step templates in both the main Flow and the Triggered Flow itself (2).

When to use?

We recommend using both Subflows and Triggered Flows in the following cases:

  • Trigger them to do calculations and return data to the main Flow.
  • Isolate logic that can be re-used to reduce the size and complexity of Flows (as large Flows can take longer to load and edit, and smaller Flows can easily be re-used and quickly iterated upon).
  • Encapsulate modal logic in one place.
  • Trigger Flows across different accounts.
  • Program them to take over a conversation, and set them up to run synchronously or asynchronously.

Any Flow within your solution can activate a Subflow/Triggered Flow as many times as needed during the business logic execution.

Difference

Although you can use both features to solve the same tasks, they have several differences in architectural aspects.

  • Sublows:
    • don't have a cold start, meaning they can immediately begin executing tasks as part of the main Flow;
    • are easier to work with and edit, being part of the main Flow. They allow seeing the whole picture;
    • use inbound parameters to pass data;
    • group a set of Steps to complete one task.
  • Triggered Flows:
    • are harder to maintain as they can be scattered throughout the account, complicating the overall understanding and management of the Flow;
    • have a cold start;
    • use Merge fields to pass data;
    • represent different processes;
    • are well-suited for scenarios where a specific piece of logic is frequently reused, such as in microservices architecture.

How to?

Proceed to this article to find more about working with Triggered Flows. Click here to learn about Subflows.