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

# Flows

> Flows decide which events your apps, such as Klaviyo and Rivo, receive, and when.

A **flow** tells Subtotal what to do when a purchase is shared or a retail account connects or disconnects. Each flow has one **trigger** and the **steps** that run after it.

Flows are how your apps get events. An app, such as Klaviyo, Rivo, Attentive or Braze, gets an event only when a flow's action sends it. Installing an app sends nothing until a flow does. The one exception is a [partner app](https://docs.subtotal.com/docs/partner-apps/webhooks.md), such as LoyaltyLion, which gets its events directly.

> [!NOTE]
>
> Flows is on for every new account. If **Flows** is not in your dashboard's side menu, your account is not on Flows yet, and your apps keep sending on their own settings until it moves.

For example, this flow gives Rivo points for a purchase once the order completes:

![A flow in the builder: Purchase shared, then a Wait for status completed, up to 30 days, then Rivo Award points at 10 points per \$1.](https://mintcdn.com/typecastleinc/z9L8m88cpu_A6mvv/images/flows/example-flow.png?fit=max\&auto=format\&n=z9L8m88cpu_A6mvv\&q=85\&s=4a3f48dbda9ce654f7a063fbefbbbdb2)

Points arrive only for completed orders, so a cancelled order earns nothing.

## The parts of a flow

| Part | What it does |
| :- | :- |
| [Trigger](https://docs.subtotal.com/docs/flows/triggers.md) | Starts the flow: **Purchase shared**, **Account connected**, or **Account disconnected**. |
| [Condition](https://docs.subtotal.com/docs/flows/steps.md#condition) | Checks its criteria, then goes on along **True** or **False**. |
| [Action](https://docs.subtotal.com/docs/flows/steps.md#action) | Sends to one of your apps. |
| [Wait](https://docs.subtotal.com/docs/flows/steps.md#wait) | Pauses a purchase until its status changes to the one you choose. |
| [Go back to](https://docs.subtotal.com/docs/flows/steps.md#go-back-to) | Ends a path by returning to an earlier step. |

You can have several flows on the same trigger.

## Build a flow

1. In the [Subtotal Dashboard](https://dashboard.subtotal.com), open **Flows** and select **Create flow**.

2. Describe the flow you want, and the chat builds it. Or select **Select a trigger** to build it yourself. Once a flow has steps, its trigger is fixed.

3. Add steps, with at least one action. The action picker lists your installed apps first, then Subtotal's own **Send webhook**, then apps you can install. A step that is not finished is marked in red, with what is left to set.

   ![The Select action panel: installed apps (Klaviyo, Rivo, Attentive, Braze), then Webhooks under Subtotal, then apps to install (Smile, Yotpo, Okendo, Meta, TikTok).](https://mintcdn.com/typecastleinc/z9L8m88cpu_A6mvv/images/flows/action-picker.png?fit=max\&auto=format\&n=z9L8m88cpu_A6mvv\&q=85\&s=5d5439c952122bb344bdce41812cd18e)

4. Select **Publish**. To keep your changes without publishing them, select **Save draft**.

5. Select **Turn on flow**.

The chat builds the flow and saves it as a draft. It does not publish a flow, discard a draft, turn a flow on or off, or add a **Send webhook** step: you do those in the builder. To ask for a change or a question about Subtotal, open **Ask Subtotal** at the bottom of any Flows page. Your past chats are under **Chat history**, and only you see them.

A flow can have up to 200 steps.

## Drafts and versions

What you save is the flow's **draft**. A draft does not run. **Publish** makes the draft the flow's next version, and the version is what runs. **Discard draft** deletes the draft and shows the current version again.

On a flow that is on, new events run a new version as soon as it is published. A purchase or connection already in the flow stays on the version it started on, to the end.

**Version history** lists each published version, newest first. A version opens read only.

## Turn a flow on or off

A flow that is off starts nothing. Publish a flow before you turn it on.

A purchase that waits in a flow you turn off stays where it is. It goes on if you turn the flow back on, and its max wait still applies.

## Delete a flow

In the builder, open the **⋯** menu and select **Delete**. The flow stops running and is removed. Its activity stays.

## What your flows send

Each app's **Actions** page lists the actions your flows take in that app, with the trigger and the flow that runs each.

To see each action step your flows reached, and whether it sent or was skipped because its app is not installed, ask an assistant: [`list_flow_activity`](https://docs.subtotal.com/docs/connector/tools#list_flow_activity) lists them.

## With an AI assistant

An assistant connected through [Subtotal: For Brands](https://docs.subtotal.com/docs/connector/introduction.md) can use the [flow tools](https://docs.subtotal.com/docs/connector/tools.md#flows) to list, create, change and delete flows, publish them, turn them on and off, and read their activity.


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