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

# Shopify Flow

> Automate inventory workflows with Stockful's Shopify Flow triggers and actions

Stockful integrates with [Shopify Flow](https://help.shopify.com/en/manual/shopify-flow) to let you build automated workflows around your inventory data. React to stock changes in real time, query forecast data mid-workflow, and update Stockful settings - all without writing code.

## What you get

<CardGroup cols={2}>
  <Card title="10 triggers" icon="bolt" href="/flow/triggers">
    Fire workflows when stock status changes, velocity shifts, or reorder points are hit
  </Card>

  <Card title="9 actions" icon="gear" href="/flow/actions">
    Query forecasts, get reorder lists, adjust demand, send Slack messages, and more
  </Card>
</CardGroup>

## Quick start

### 1. Create a workflow in Shopify Flow

In your Shopify admin, go to **Settings > Flow** (or **Apps > Flow**) and click **Create workflow**.

### 2. Pick a Stockful trigger

Click **Select a trigger** and search for "Stockful". You'll see all 10 triggers listed by name. Choose the event you want to react to.

### 3. Add conditions and actions

Use Flow's built-in conditions to filter on the trigger data (e.g. only fire when ABC class is "A"), then add actions - either Stockful's own actions or any other Flow-compatible action like sending an email, tagging a product, or creating an order note.

## How triggers work

Stockful fires triggers as part of its normal inventory processing:

* **Real-time triggers** (low stock, out of stock, restocked, reorder point reached) fire within seconds of an inventory change
* **Daily triggers** (ABC class change, velocity change, stockout projected, sell-through milestone, dead stock, overstock) fire during the daily analytics run

Each trigger includes rich context - not just the event itself, but forecast data like velocity, days of supply, and reorder quantities. This means you can build sophisticated conditions without needing a separate "Get forecast" action.

## How actions work

Stockful actions are called by Flow during workflow execution. They fall into three categories:

* **Query actions** return data you can use in subsequent workflow steps (Get forecast, Get inventory health, Get stock by location, Get reorder list, Get transfer suggestion)
* **Write actions** update Stockful settings for a variant (Set safety stock, Set lead time, Set demand adjustment)
* **Integration actions** connect to external services (Send Slack message)

## Example workflows

Here are some common patterns to get you started:

* **Auto-tag low stock products** - When "Low stock detected" fires, add a "low-stock" tag to the product so it shows up in filtered collections
* **Slack alert for bestseller stockouts** - When "Out of stock" fires, check if ABC class is "A", then send a Slack message to your purchasing channel
* **Seasonal demand adjustment** - On a schedule, use "Set demand adjustment" to increase forecast by 30% for products tagged "holiday"
* **Auto-create purchase orders** - When "Reorder point reached" fires, use the included reorder quantity to create a draft order or send an email to your supplier

See the [examples page](/flow/examples) for detailed step-by-step workflow setups.
