PHPackages                             abderrahimghazali/sylius-workflow-plugin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. abderrahimghazali/sylius-workflow-plugin

ActiveSylius-plugin[Mail &amp; Notifications](/categories/mail)

abderrahimghazali/sylius-workflow-plugin
========================================

Visual marketing automation with node-based canvas for Sylius 2.x

v2.0.0(1mo ago)120↑2750%MITPHPPHP ^8.2CI passing

Since Mar 29Pushed 1mo agoCompare

[ Source](https://github.com/abderrahimghazali/sylius-workflow-plugin)[ Packagist](https://packagist.org/packages/abderrahimghazali/sylius-workflow-plugin)[ Docs](https://github.com/abderrahimghazali/sylius-workflow-plugin)[ RSS](/packages/abderrahimghazali-sylius-workflow-plugin/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (7)Versions (2)Used By (0)

 [    ![Sylius Logo](https://camo.githubusercontent.com/ea9dddc934264aa7ec01cf3202c500f3d8b04448bce2571bdc74230efddda88f/68747470733a2f2f6d656469612e73796c6975732e636f6d2f73796c6975732d6c6f676f2d3830302e706e67)  ](https://sylius.com)

Sylius Workflow Plugin
======================

[](#sylius-workflow-plugin)

 Visual marketing automation engine with a node-based canvas editor for [Sylius 2.x](https://sylius.com) stores.

 [![CI](https://github.com/abderrahimghazali/sylius-workflow-plugin/actions/workflows/ci.yaml/badge.svg)](https://github.com/abderrahimghazali/sylius-workflow-plugin/actions/workflows/ci.yaml) [![Latest Version](https://camo.githubusercontent.com/42313a8948d344a7b08fdd5d473c38ad9d11e6d4c0c88f299794c8df96717cb5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6162646572726168696d6768617a616c692f73796c6975732d776f726b666c6f772d706c7567696e2e737667)](https://packagist.org/packages/abderrahimghazali/sylius-workflow-plugin) [![PHP Version](https://camo.githubusercontent.com/5b2d5a7287a320b14c78a8527a3b29dcef023f53641b0e36905eb909cfe197fa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6162646572726168696d6768617a616c692f73796c6975732d776f726b666c6f772d706c7567696e2e737667)](https://packagist.org/packages/abderrahimghazali/sylius-workflow-plugin) [![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE) [![Sylius 2.x](https://camo.githubusercontent.com/47390b9b61d6f22d062322df61d2d225ceaf33f7bb75b99592c7ba766049f3e5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f73796c6975732d322e782d677265656e2e737667)](https://packagist.org/packages/abderrahimghazali/sylius-workflow-plugin) [![Symfony 7.x](https://camo.githubusercontent.com/fe777aec93f146d83db2752ebd66562c8d4d1be48fa4a1477c51c0dbab74e381/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f73796d666f6e792d372e782d626c61636b2e737667)](https://packagist.org/packages/abderrahimghazali/sylius-workflow-plugin) [![PHPStan Level 5](https://camo.githubusercontent.com/0729e562e10fac943b16dbb271b4af26488f779a33fc82cc3eef1e37a432c0b4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c253230352d627269676874677265656e2e737667)](https://camo.githubusercontent.com/0729e562e10fac943b16dbb271b4af26488f779a33fc82cc3eef1e37a432c0b4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c253230352d627269676874677265656e2e737667)

---

Screenshots
-----------

[](#screenshots)

### Canvas Editor — Visual Node-Based Workflow Builder

[](#canvas-editor--visual-node-based-workflow-builder)

[![Canvas Editor](docs/images/canvas-editor.png)](docs/images/canvas-editor.png)

### Workflow List — Admin Grid

[](#workflow-list--admin-grid)

[![Workflow List](docs/images/workflow-list.png)](docs/images/workflow-list.png)

### Run Detail — Execution Timeline

[](#run-detail--execution-timeline)

[![Run Detail](docs/images/run-detail.png)](docs/images/run-detail.png)

Features
--------

[](#features)

- **Visual node-based canvas** — drag-and-drop workflow builder powered by React Flow v12
- **4 node types:** Trigger, Condition, Action, Delay — each with color-coded cards and config panels
- **Directed graph execution engine** — walks the graph node by node with full logging
- **8 trigger events:** order.completed, order.cancelled, order.shipped, cart.abandoned, customer.registered, customer.birthday, loyalty.tier\_upgraded, payment.failed
- **6 condition rules:** order total, first order, customer tag, customer country, loyalty tier, workflow run count
- **7 action types:** send email, generate coupon, add/remove customer tag, add loyalty points, send webhook, add order note
- **Delay nodes** — deferred execution via Symfony Messenger with DelayStamp (minutes, hours, days, weeks)
- **Deduplication** — SHA-256 hash prevents workflows from double-firing on the same subject per day
- **8 pre-built templates** — abandoned cart recovery, post-purchase review, win-back, birthday coupon, loyalty tier upgrade, welcome, upsell, payment recovery
- **Template browser** — one-click install of pre-built workflows directly from the admin panel
- **Test run** — dry-run mode evaluates conditions without executing actions, highlights execution path on canvas
- **Admin CRUD** — Sylius Grid workflow list with status badges, enabled toggle, and action buttons
- **Run log viewer** — per-workflow execution history with node-by-node timeline and status badges
- **Analytics dashboard** — 30-day stats cards, daily runs chart (Chart.js), per-workflow breakdown table
- **8 email templates** — clean, responsive HTML emails with shared base layout
- **Graceful degradation** — loyalty plugin integration via `class_exists()`, failed actions don't stop the workflow
- **Graph validation** — cycle detection (DFS), trigger count enforcement, edge integrity checks (frontend + backend)
- **No CSS conflicts** — all styles prefixed with `swp-` to avoid Sylius admin clashes

Requirements
------------

[](#requirements)

RequirementVersionPHP^8.2Sylius^2.1Symfony^7.0Node.js^20 (for building canvas assets)Installation
------------

[](#installation)

1. Require the plugin:

```
composer require abderrahimghazali/sylius-workflow-plugin
```

2. Register the bundle in `config/bundles.php` (if not auto-discovered):

```
return [
    // ...
    Abderrahim\SyliusWorkflowPlugin\SyliusWorkflowPlugin::class => ['all' => true],
];
```

3. Import routes — create `config/routes/sylius_workflow.yaml`:

```
sylius_workflow:
    resource: '@SyliusWorkflowPlugin/config/routes.yaml'
```

4. Generate and run the migration:

```
bin/console doctrine:migrations:diff
bin/console doctrine:migrations:migrate
```

5. Build the React canvas assets:

```
cd vendor/abderrahimghazali/sylius-workflow-plugin
npm install --prefix assets
npx webpack --mode production
```

Then symlink the built file to your public directory:

```
bin/console assets:install public
```

Usage
-----

[](#usage)

### Creating a Workflow

[](#creating-a-workflow)

1. Navigate to **Marketing &gt; Automation Workflows** in the admin sidebar
2. Click **New workflow** — enter a name and description
3. You'll be redirected to the **canvas editor** with a default trigger node
4. Add nodes from the **+ Add Node** dropdown (Condition, Action, Delay)
5. Connect nodes by dragging from the **Then** handle to the entry handle
6. Configure each node by clicking it — the right panel shows type-specific fields
7. Click **Save** to validate and persist the graph
8. Toggle **Activate** when ready

### Installing a Template

[](#installing-a-template)

1. Go to **Marketing &gt; Automation Workflows**
2. Click **Browse Templates** (or navigate to `/admin/workflows/templates`)
3. Browse the 8 pre-built workflows by category
4. Click **Install Template** — creates a draft workflow you can customize before activating

### Test Run

[](#test-run)

1. Open any workflow in the canvas editor
2. Click **Test Run** in the toolbar
3. Select a subject type (Order or Customer) and enter an ID
4. The dry-run evaluates conditions for real but skips all actions
5. The canvas highlights the execution path: green = passed, amber = skipped

### Run Log

[](#run-log)

1. From the workflow list, click **View Runs** on any workflow
2. See all execution history with status badges (completed/failed/skipped/running)
3. Click **View Details** to see the node-by-node execution timeline

Node Reference
--------------

[](#node-reference)

### Trigger Events

[](#trigger-events)

EventDescription`order.completed`Fires when an order is completed`order.cancelled`Fires when an order is cancelled`order.shipped`Fires when an order is shipped`cart.abandoned`Fires when a cart is abandoned`customer.registered`Fires when a new customer registers`customer.birthday`Fires on a customer's birthday`loyalty.tier_upgraded`Fires when a loyalty tier is upgraded`payment.failed`Fires when a payment fails### Condition Rules

[](#condition-rules)

RuleOperatorsDescription`order_total`is, is\_not, gt, lt, gte, lteCompare order total (in cents)`customer_first_order`is, is\_notCheck if this is the customer's first order`customer_tag`is, is\_not, containsCheck customer tags`customer_country`is, is\_notCheck customer address country code`loyalty_tier`is, is\_notCheck loyalty tier name`workflow_run_count`is, is\_not, gt, lt, gte, lteHow many times this workflow ran for this customer### Action Types

[](#action-types)

ActionConfig FieldsDescription`send_email`template, subjectSend an email via Symfony Mailer`generate_coupon`promotion, discount, expires\_in\_daysCreate a Sylius promotion coupon`add_customer_tag`tagAdd a tag to the customer`remove_customer_tag`tagRemove a tag from the customer`add_loyalty_points`amount, reasonAward loyalty points (requires loyalty plugin)`send_webhook`url, methodSend an HTTP POST/PUT to an external URL`add_order_note`noteAppend a note to the orderBuilt-in Templates
------------------

[](#built-in-templates)

TemplateTriggerFlowAbandoned Cart Recoverycart.abandonedWait 1h &gt; Send emailPost-Purchase Revieworder.completedWait 7d &gt; First order? &gt; Send emailWin Back Inactivecart.abandonedGenerate coupon &gt; Send emailBirthday Couponcustomer.birthdayGenerate coupon &gt; Send emailLoyalty Tier Upgradeloyalty.tier\_upgradedSend email &gt; Add 50 pointsNew Customer Welcomecustomer.registeredWait 1h &gt; Send emailPost-Purchase Upsellorder.completedWait 3d &gt; First order? &gt; Send emailPayment Failed Recoverypayment.failedWait 2h &gt; Send emailIntegration
-----------

[](#integration)

### Loyalty Plugin

[](#loyalty-plugin)

If [`abderrahimghazali/sylius-loyalty-plugin`](https://github.com/abderrahimghazali/sylius-loyalty-plugin) is installed, the **Add Loyalty Points** action dispatches events to it. If not installed, the action logs a warning and skips gracefully.

### Upsell Plugin

[](#upsell-plugin)

The **Post-Purchase Upsell** template works independently but can be enhanced with [`abderrahimghazali/sylius-upsell-plugin`](https://github.com/abderrahimghazali/sylius-upsell-plugin) for product recommendation data.

Testing
-------

[](#testing)

```
# PHP tests
vendor/bin/phpunit

# Static analysis
vendor/bin/phpstan analyse

# Build JS assets
cd assets && npm install && cd .. && npx webpack --mode production
```

License
-------

[](#license)

MIT. See [LICENSE](LICENSE).

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance90

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

46d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e1be9cf8e271987c350c614aa618f0e68c7f7409634e51f8c8fe105490899b0f?d=identicon)[abderrahim.ghazali](/maintainers/abderrahim.ghazali)

---

Top Contributors

[![abderrahimghazali](https://avatars.githubusercontent.com/u/12643883?v=4)](https://github.com/abderrahimghazali "abderrahimghazali (57 commits)")

---

Tags

automationecommercemarketingphpreact-flowsyliussylius-pluginsymfonyworkflowautomationemailsyliusworkflowmarketingcanvassylius-pluginnode-based

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/abderrahimghazali-sylius-workflow-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/abderrahimghazali-sylius-workflow-plugin/health.svg)](https://phpackages.com/packages/abderrahimghazali-sylius-workflow-plugin)
```

###  Alternatives

[bitbag/mailchimp-plugin

MailChimp plugin for Sylius.

4463.9k](/packages/bitbag-mailchimp-plugin)[princealikhan/laravel-mautic-api

Free and Open Source Marketing Automation API

415.9k](/packages/princealikhan-laravel-mautic-api)[synolia/sylius-mail-tester-plugin

Mail Tester Plugin.

14142.2k1](/packages/synolia-sylius-mail-tester-plugin)[odiseoteam/sylius-mailchimp-plugin

Plugin for Sylius to add Mailchimp ecommerce features

1015.2k](/packages/odiseoteam-sylius-mailchimp-plugin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
