Marketing Skills

Flow Specification Examples

A reference file of the Shopify Flow skill. Your AI app reads it when the skill points to it.

These examples are abstract. Replace every task name and field with verified account-visible values.

Low-stock internal alert

decision: notify operations when a sellable variant crosses its approved stock threshold
trigger: verified inventory-change event
conditions:
  - tracked inventory is enabled
  - sellable quantity is at or below the variant-specific threshold
  - alert marker for the current low-stock episode is absent
actions:
  - create an internal alert using an approved channel
  - mark the episode as alerted using an approved reversible field
reset: remove the episode marker only after inventory recovers above the reset threshold
privacy: include product and inventory identifiers, not customer data
stop: disable on alert storm, bad threshold data, or action failure

The reset threshold can differ from the alert threshold to prevent repeated boundary alerts. The values must come from operations, not from a universal rule.

High-value-order review queue

decision: route qualifying orders for internal review without delaying normal orders by default
trigger: authoritative order event
conditions:
  - named order-value definition exceeds the approved threshold
  - order is not already queued
actions:
  - add an approved internal marker
  - notify the approved review queue with minimized data
exceptions:
  - canceled, test, duplicate, or excluded orders
manual_fallback: documented review procedure and owner

Do not imply fraud or cancel an order solely because it has high value.

Test matrix

CaseInputExpected branchExpected actionMust not happen
PositiveMeets all verified conditionsTrueOne approved actionDuplicate action
NegativeExcluded resourceFalseNoneTag or notification
BoundaryValue equals thresholdDefined by specDefined by specAmbiguous behavior
DuplicateSame event delivered twiceOne effective resultIdempotent handlingRepeated external effect
Missing fieldRequired field absentSafe failure pathAlert or queueDestructive default
Action failureExternal task failsRecovery pathLogged failureFalse completion

Source on GitHub