Skip to main content
Version: 2.0.0

Flow Manager

Navigate to yStore → Marketing → Flows.

The Flow Manager is yStore's built-in visual automation engine. It lets you build workflows that fire automatically in response to store events — from a simple "send a welcome email" to multi-branch sequences with conditions, delays, A/B tests, and third-party integrations. No coding required.

Background processing

Flows run in the background via the Craft queue system. Every pending flow step is evaluated on each CRON run (default: every 5 minutes). Time-delayed steps wait their full duration before the next action executes.

How flows work

Every flow follows the same structure:

Trigger  →  Conditions (optional)  →  Actions / Logic
ComponentRole
TriggerThe event that starts the flow
ConditionOptional filter — if the condition fails, the flow stops for that event
ActionWhat happens — send email, create coupon, update customer, etc.
LogicControl structures — wait, branch, loop, A/B test, etc.

Flows can have any number of actions and logic nodes arranged in any order. You can build simple linear sequences or complex branching trees.


Triggers

Triggers are the entry points for flows. Each trigger fires when a specific store event occurs and passes relevant data (the payload) into the flow.

Orders

TriggerWhen it firesPayload
Order PlacedImmediately after a successful checkoutOrder, customer, cart items
Order Status ChangedWhen an order moves to a specific statusOrder, old status, new status
Order CancelledWhen an order is cancelledOrder, cancellation reason
Checkout Payment FailedWhen a payment attempt fails at checkoutOrder draft, payment method

Cart & Abandonment

TriggerWhen it firesPayload
Cart AbandonedWhen a cart has not been updated for the configured timeoutCart, customer (if logged in), items
Cart Total Threshold ReachedWhen the cart subtotal crosses a configured valueCart, threshold, customer

Customers

TriggerWhen it firesPayload
Customer RegisteredNew customer account createdCustomer
Customer ApprovedAdmin approves a pending accountCustomer
Customer RejectedAdmin rejects a pending accountCustomer
Customer BlockedCustomer is added to the banned listCustomer
Customer First OrderCustomer completes their very first purchaseCustomer, order
Customer BirthdayToday matches the customer's birth dateCustomer
Customer Logged InCustomer authenticatesCustomer, session
Customer Auth ActivityAny authentication event (login, logout, token refresh)Customer, event type

Marketing

TriggerWhen it firesPayload
Coupon RedeemedA coupon code is used at checkoutCoupon, customer, order
Newsletter SubscribedSubscriber status becomes activeSubscriber, customer
Wishlist Item AddedCustomer adds any product to a wishlistWishlist, product, customer
Catalog Rule MatchedA catalog price rule is applied to a productRule, product

Subscriptions

TriggerWhen it firesPayload
Subscription StartedCustomer starts a subscription planSubscription, customer
Subscription EndedSubscription expires or is cancelledSubscription, reason

Content (Craft)

TriggerWhen it firesPayload
Asset UploadedA file is uploaded to CraftAsset, volume
Asset DeletedA file is deletedAsset
Category CreatedA category entry is createdCategory
Category UpdatedA category entry is savedCategory, changed fields

Manual

TriggerWhen it fires
Manual TriggerFlow is run on demand from the admin list
Payload variables

Every trigger injects its payload as flow variables. You can reference them in action templates using {{ order.total }}, {{ customer.email }}, {{ coupon.code }}, etc. Use the variable picker in the node editor to browse available fields.

Full triggers reference

For complete field-level documentation, payload keys, and custom trigger development, see the Flow Manager — Triggers Reference.


Conditions

Conditions are evaluated after the trigger fires. If the condition returns false, the flow branch stops for that event — other branches may continue.

Order conditions

ConditionOptions
Order TotalGreater than / less than / equals
Order StatusIs / is not a specific status
Product in OrderA specific product (by ID or SKU) is / is not in the order
Coupon Was AppliedTrue / false
Payment MethodIs / is not a specific method
Shipping MethodIs / is not a specific method

Customer conditions

ConditionOptions
Customer GroupIs / is not in a group
Customer is GuestTrue / false
Customer Order CountGreater than / less than / equals
User in GroupSame as Customer Group — works for Craft users

Date & Time conditions

ConditionOptions
Date CompareCurrent date is before / after / equals a date
Time WindowCurrent time is within / outside a configured window

Value conditions

ConditionOptions
Compare ValuesTwo flow variables are equal / not equal / greater / less
String ContainsA string variable contains / does not contain a substring
List ContainsA collection variable includes / excludes a value
Random ChanceTrue with a configured probability (e.g., 30%) — useful for A/B tests

Content conditions

ConditionOptions
Entry ExistsA Craft entry matching a query exists / does not exist

Actions

Actions perform operations when executed. They run sequentially by default; use Logic nodes to branch or parallelize.

Full actions reference

For complete field-level documentation, output variables, and custom action development, see the Flow Manager — Actions Reference.

Email & Messaging

ActionDescription
Send Email to CustomerSend a custom Twig-templated email to the flow's customer
Send Email TemplateSend a saved Marketing Email Template — reusable, managed from the admin
Send Email to AdminNotify a configured admin email address

Discounts & Coupons

ActionDescription
Create CouponGenerate a new coupon from an existing coupon template and attach it to the customer
Apply DiscountApply a fixed or percentage discount directly to the triggering order
Add Reward PointsAdd loyalty points to the customer's account (requires Reward Points plugin)
Remove Reward PointsDeduct loyalty points

Customer Management

ActionDescription
Update CustomerUpdate customer fields (name, phone, custom fields)
Change User GroupMove the customer to a different Craft user group
Add to SegmentTag the customer for segmentation
Block CustomerAdd the customer to the banned customers list
Approve CustomerAuto-approve a pending account
Subscribe to NewsletterSet subscriber status to active
Unsubscribe from NewsletterSet subscriber status to unsubscribed

Order Management

ActionDescription
Update Order StatusMove the order to a new status
Cancel OrderCancel the triggering order
Add Order NoteAdd an internal note to the order
Add Order TagAttach a tag to the order for filtering
Recalculate OrderRe-run price calculations on the order

External & Webhooks

ActionDescription
Send WebhookPOST a JSON payload to any external URL
HTTP RequestMake a GET, POST, PUT, or DELETE request to any API
Run FlowTrigger another flow by ID — for modular, reusable sub-flows

Logic

Logic nodes control the structure of your flow — branching, looping, timing, and deduplication.

Branching

NodeWhat it does
If / ElseEvaluate a condition and route to different branches
SwitchMulti-branch routing based on a variable value
A/B TestSplit the flow into two paths by a configured probability

Loops & Collections

NodeWhat it does
For EachIterate over a collection (e.g., order items) and run actions for each item
MapTransform each item in a collection
Filter CollectionRemove items from a collection that do not meet a condition
ReduceAggregate a collection to a single value
SplitDivide a flow into parallel branches
MergeWait for all parallel branches to complete before continuing

Timing

NodeWhat it does
Wait (Delay)Pause execution for a set duration (minutes, hours, days)
Time WindowBlock execution until a certain time of day

Rate & Safety

NodeWhat it does
ThrottleLimit how often this flow path runs (e.g., max once per customer per day)
Rate LimitCap total executions across all customers in a time period
DeduplicateSkip execution if the same trigger has fired for this customer within a window
RetryAutomatically retry a failed action up to a configured number of times
AccumulatorCollect multiple trigger events before proceeding (e.g., batch 10 events)
Priority QueueHold execution until higher-priority flows for the same customer finish
BatchProcess a collection in chunks (e.g., 50 items at a time)
Test before activating

Use the Test button to dry-run the flow before setting it to Active. Without testing, a newly activated flow could immediately email your entire customer base depending on the trigger.


Building a flow

  1. Go to yStore → Marketing → Flows.
  2. Click New Flow.
  3. Enter a name and optional description.
  4. Click the canvas to add the first node — select your Trigger.
  5. Add Condition nodes if you want to filter who this flow runs for.
  6. Add Action and Logic nodes by clicking + below any existing node.
  7. For multi-step sequences, insert a Wait node between steps.
  8. Use the Variable Picker (the {} button in any text field) to inject flow data into templates.
  9. Set the flow Status to Active.
  10. Click Save.

Real-world examples

Abandoned cart recovery (3-step)

[Cart Abandoned]

[Condition: Cart total > €10]

[Send Email: "You left something behind" + cart link]

[Wait: 23 hours]

[Condition: Cart not yet converted]

[Send Email: 5% coupon code offer]

[Wait: 48 hours]

[Condition: Cart still not converted]

[Send Email: Final reminder]

[End]
Cart abandoned threshold

Configure how long a cart must be inactive before it counts as abandoned at yStore → Settings → Sales → Marketing → Abandoned Cart Timeout.

Welcome sequence for new subscribers

[Newsletter Subscribed]

[Send Email: Welcome + 10% first-order coupon]

[Wait: 3 days]

[Condition: Customer has placed 0 orders]

[Send Email: "Don't forget your discount" reminder]

VIP upgrade flow

[Customer First Order trigger is not needed here — use Customer Rules to move to VIP group]

[Customer Group Changed] (fired by Customer Rule when order count ≥ 5)

[Condition: Customer is in "VIP" group]

[Send Email: VIP welcome + exclusive discount]

[Add Order Tag: "vip-enrolled"]

Email Templates

Go to yStore → Marketing → Flows → Templates tab.

Email templates are reusable, centrally managed email designs. Instead of writing HTML inline in each flow action, you build templates once and reference them in flows using Send Email Template.

Each template has:

  • A name (internal identifier)
  • A subject line (supports flow variables)
  • An HTML body (Twig, with access to all flow variables)
  • An optional plain text fallback

Templates can be updated independently of the flows that use them — changing the template updates all flows that reference it automatically.


Credentials

Go to yStore → Marketing → Flows → Credentials tab.

Credentials store API keys and connection settings for third-party integrations used inside flows (Mailchimp, Slack, custom webhook auth, etc.). Credentials are stored securely and referenced by name in action nodes.

FieldDescription
NameInternal label used to select the credential in action nodes
TypeThe integration type (Mailchimp, Slack, HTTP Bearer, HTTP Basic, etc.)
ConfigurationType-specific fields (API key, URL, username/password, etc.)

Flow runs (execution history)

Go to yStore → Marketing → Flows → [Flow name] → Runs, or yStore → Logs → Automation.

Every flow execution is logged with full step-by-step detail.

ColumnDescription
FlowThe flow that ran
TriggerWhat event started the run
Statuscompleted, failed, running, paused
Started atWhen the run began
DurationTotal elapsed time
StepsNumber of nodes executed

Click any run to see the per-node execution log — including inputs, outputs, and error messages for failed steps.

Diagnosing failed runs

If a run shows failed, open it and look for the red node. The error message usually tells you exactly what went wrong — a missing variable, a bad API response, or a condition that could not be evaluated.


Flow health

Go to yStore → Marketing → Flows → [Flow name] → Health.

The health panel shows an overview of a flow's recent execution history:

  • Success rate over the last 7 / 30 days
  • Most common failure reasons
  • Average run duration
  • Active vs. paused executions

Managing flows

ActionHow
Activate / DeactivateToggle the Status field on the flow list
DuplicateClick Duplicate on any flow
ArchiveDisable and move out of the active list without deleting
DeleteClick Delete (cannot be undone; run history is also deleted)
Deleting a flow

Deleting a flow removes all its run history permanently. If you want to keep history for auditing, disable the flow instead.


Console commands

# Manually run a specific flow (by ID)
php craft yui/flow/run --id=123

# Re-run all failed flow steps
php craft yui/flow/retry-failed

# Clean up old flow run logs (older than 30 days)
php craft yui/flow/cleanup