Shopify Flow — triggers & actions
The full reference of 11 StockSweep triggers and 9 actions for Shopify Flow, plus rate limits, retries and the safety rules that apply to Flow-driven discounts.
Show all sections (17)
- Actions — what a Flow can tell StockSweep to do
- Safety rules still apply
- Rate limits and retries
- Payload limits
- Verify it is working
- Troubleshooting
- My Flow did not fire
- The action ran but nothing changed
- Dispatches are dead-lettering
- FAQ
- Do Flow actions count against my API rate limit?
- Can a Flow discount below my margin floor?
- What happens when a trigger's schema changes?
- Related articles
Shopify Flow is the fastest way to wire StockSweep into the rest of your Shopify operation without writing code. StockSweep publishes 11 triggers (StockSweep events that can start a Flow) and 9 actions (things a Flow can tell StockSweep to do).
Estimated time: 6 minutes
What you'll accomplish
- Know every trigger and action available, and what each carries
- Understand how rate limits and retries affect a busy Flow
- Know which safety rules still apply to a Flow-driven discount
- Know how to tell whether a Flow actually ran
Requirements
- Plan: Enterprise.
- Shopify Flow installed on your store.
- Found at Settings → Integrations → Shopify Flow, with the full list under its Triggers & Actions tab.
Triggers — StockSweep events that start a Flow
| Trigger | Fires when |
|---|---|
| Dead stock detected | A product is newly identified as dead stock |
| Aging bucket crossed | A product moves into an older aging bucket |
| Discount applied | A StockSweep discount is applied |
| Discount reverted | A discount is undone |
| Flash sale started | A flash sale begins |
| Flash sale ended | A flash sale ends |
| Clearance collection updated | The clearance collection's membership changes |
| Dead stock escalated | An escalation chain advances a product to its next stage |
| Margin clamp fired | A discount was clamped by the margin floor |
| Smart suggestion created | A new suggestion is generated |
| Seasonal dormancy detected | A product enters a recognised seasonal trough |
Margin clamp fired is the one most worth building on. It tells you a product wanted a deeper discount than its margin allows — which is usually a purchasing or supplier signal, not a merchandising one.
Actions — what a Flow can tell StockSweep to do
| Action | Effect |
|---|---|
| Apply discount | Apply a discount to the product |
| Revert discount | Undo a discount |
| Add to clearance collection | Add the product to your clearance collection |
| Remove from clearance collection | Remove it |
| Schedule flash sale | Schedule a flash sale |
| Flag as dead stock | Mark a product as dead stock manually |
| Exclude from dead stock | Exclude a product from detection |
| Send Slack or Teams message | Push a message to your chat channel |
| Push event to email provider | Send an event to your connected ESP |
Safety rules still apply
This is the important part. A Flow-driven Apply discount is not a bypass:
- Margin protection still runs. The discount goes through the same policy gate as every other path, so it can be clamped to your floor or skipped entirely. See Margin Protection Explained.
- Plan entitlement still applies. An action your plan does not include returns a feature locked outcome rather than executing.
- Validation still applies. A malformed input returns a validation failure, visible in the invocation log.
If an action did not do what you expected, its outcome will be one of: Succeeded, Validation failed, Feature locked, Platform rejected, or Internal error.
Rate limits and retries
Triggers are rate limited at 90 per minute, 900 per hour and 9,000 per day. Inbound actions are limited to 60 per minute.
When a trigger dispatch fails, it retries at 1m → 5m → 30m → 2h → 8h, and is dead-lettered after 24 hours. Dispatch outcomes are recorded as Succeeded, Retry scheduled, Dead lettered, Suppressed or Throttled — so a Flow that did not fire can always be distinguished from one that fired and failed.
A circuit breaker opens if more than 50% of dispatches fail within a 5-minute window, and stays open for 5 minutes. This stops a broken endpoint from consuming your whole rate budget.
Clearance collection updated is debounced by 5 minutes: a bulk change that touches a hundred products sends one trigger, not a hundred.
Payload limits
- Inbound action input: 128 KB
- Outbound trigger payload: 64 KB
Inbound requests are HMAC-verified with a 5-minute replay window, and deduplicated for 24 hours so a Shopify-side retry cannot double-apply an action.
Verify it is working
- Open Settings → Integrations → Shopify Flow. The connection status should read Active.
- Run a Flow manually and check the dispatch and invocation logs — each records the outcome.
- Dispatch and invocation history is retained for 90 days.
Troubleshooting
My Flow did not fire
Check the dispatch log for the outcome. Throttled means a rate limit; Suppressed usually means debouncing; nothing at all means the event never occurred — confirm the underlying StockSweep event actually happened.
The action ran but nothing changed
Read the invocation outcome. Feature locked means your plan does not include it. Succeeded on an Apply discount that shows no price change usually means margin protection skipped it — check the discount history.
Dispatches are dead-lettering
24 hours of failed retries. Check the connection status; Degraded points at credentials rather than at Flow.
FAQ
Do Flow actions count against my API rate limit?
No. Flow actions have their own limit of 60 per minute, separate from the Public API's token bucket.
Can a Flow discount below my margin floor?
No. Flow actions run through the same margin policy as every other discount path.
What happens when a trigger's schema changes?
Older schema versions remain accepted for 180 days after a change, so a Flow built against the previous version keeps working while you migrate.
Related articles
Was this article helpful?
Let us know — your feedback helps us improve our documentation.