Shopify Flow
Shopify Flow automates your store with "when this happens, do that" workflows. ShopPress adds one trigger and one action, so plugins plug into any workflow.
Action: Run ShopPress plugin
Use it in a workflow to run a plugin tool:
| Field | Value |
|---|---|
| Plugin | the plugin's slug, e.g. tag_big_orders |
| Tool | the tool name, e.g. tag_order |
| Input (JSON) | optional, e.g. {"threshold": 5}; Flow variables can be used |
The run happens in the background; its result is in the plugin's run log. The plugin sees sp.trigger = flow and the Flow properties in sp.event. Mark tools you plan to use from Flow with flow: true.
Trigger: ShopPress plugin event
Start workflows from a plugin:
sp.flow.trigger("low stock", { count: 3, skus: ["A1", "B2", "C3"] });
In Flow, choose the trigger ShopPress plugin event. It provides Plugin, Event and Details (text, often JSON). Add a condition such as Event is "low stock", then any Flow action: send an email, post to Slack, add tags.
The gallery's Low stock alert uses this: every hour it checks stock and triggers a Flow event for new low-stock items.