PHPackages                             etechflow/module-supplier-autoflow - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. etechflow/module-supplier-autoflow

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

etechflow/module-supplier-autoflow
==================================

Magento 2 module that auto-toggles supplier active flags based on stock and reprices products from the first-active supplier's cost × markup. Built for stores with multi-supplier products and dynamic supplier-driven pricing. Pairs cleanly with ETechFlow Next Day Eligibility — when a supplier flips, NDE re-evaluates next-day eligibility automatically.

1.1.0(1mo ago)02proprietaryPHPPHP ~8.1.0||~8.2.0||~8.3.0||~8.4.0CI passing

Since May 23Pushed 1mo agoCompare

[ Source](https://github.com/etechflow/module-supplier-autoflow)[ Packagist](https://packagist.org/packages/etechflow/module-supplier-autoflow)[ RSS](/packages/etechflow-module-supplier-autoflow/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (18)Versions (4)Used By (0)

ETechFlow Supplier Autoflow
===========================

[](#etechflow-supplier-autoflow)

Auto-toggle supplier active flags based on stock, then reprice products from the first-active supplier's `cost × markup`. For Magento 2 stores with multi-supplier products and dynamic supplier-driven pricing.

What it does
------------

[](#what-it-does)

You sell the same product through multiple suppliers in priority order:

```
S1 = Onlyda          (your manufacturer; cheap; only ships from your own stock)
S2 = Auto Remote     (drop-ship; more expensive; ships when Onlyda is out)
S3 = Remkeys         (drop-ship fallback)

```

This module makes that workflow automatic:

1. **Auto-toggle**: when Onlyda stock hits 0, flip S1's `active` flag off. The product now fulfills from S2 = Auto Remote.
2. **Reprice**: with S2 now first-active, recompute the customer-facing price as `S2.cost × (1 + S2.markup / 100)`. Apply your configured rounding + anchor strategy. Write to `price` and/or `special_price` per your output target.
3. **Audit**: every flip + reprice is logged to `etechflow_supplier_autoflow_log`so finance can trace why a price changed.
4. **NDE integration**: if you also run `etechflow/module-next-day-eligibility`, the module synchronously triggers NDE's evaluator after every change. `next_day_eligible` stays in sync with the active supplier — no event-bus relay required.

Everything is merchant-configurable
-----------------------------------

[](#everything-is-merchant-configurable)

No supplier names, no attribute codes, no markup percentages are hardcoded. All configuration lives in `Stores → Configuration → eTechFlow → Supplier Autoflow`.

### Supplier slot definition

[](#supplier-slot-definition)

One slot per line, in priority order (top = highest priority):

```
S1|s1_active|s1|s1_cost|s1_markup
S2|s2_active|s2|s2_cost|s2_markup
S3|s3_active|s3|s3_cost|s3_markup

```

Format: `label|active_attr|name_attr|cost_attr|markup_attr[|stock_source_or_qty_attr]`.

### Stock-dependent suppliers

[](#stock-dependent-suppliers)

Name-based, not slot-position-based. Lists which supplier *names* get the auto-toggle behaviour:

```
Onlyda
OurOwnWarehouse

```

Other slots (drop-ship suppliers) stay manual-only. The merchant decides when to disable them.

### Stock trigger source

[](#stock-trigger-source)

Pick from: `magento_qty`, `msi_default`, `msi_per_slot`, `per_slot_qty_attr`, `disabled`. MSI modes soft-detected — module installs and works on non-MSI builds.

### Price output target

[](#price-output-target)

- `price` — write to regular price only.
- `special_price` — write to special price only.
- `special_price_with_anchor` (recommended) — write computed value to `special_price`, write `price = special_price × anchor_multiplier`. Renders strikethrough on storefront + sale-pricing on Google Shopping.

### Rounding

[](#rounding)

`2dp`, `5p`, `10p`, `99p_ending`, or `none`.

### No-active-supplier fallback

[](#no-active-supplier-fallback)

When every slot is inactive (all suppliers out): set product to out-of-stock, disable it entirely, or leave unchanged with a warning.

How it stays accurate
---------------------

[](#how-it-stays-accurate)

1. **Legacy stock event observer** — `cataloginventory_stock_item_save_after`.
2. **MSI source-items plugin** — `Magento\InventoryApi\Api\SourceItemsSaveInterface`, soft-detected so non-MSI installs skip it cleanly.
3. **Product-save observer** — re-runs the pricing engine when a merchant manually flips a slot's active flag or changes cost/markup.
4. **Hourly cron** — belt-and-braces safety net for any propagation hole.
5. **CLI** — `bin/magento etechflow:autoflow:resync [--sku=...]` for manual full-catalogue evaluation.
6. **FPC tag invalidation** — `cat_p_` clean after every price write, so customers see fresh HTML without a manual `cache:flush`.

Reverse toggle
--------------

[](#reverse-toggle)

When stock comes back (Onlyda restocked), the previously auto-toggled slot flips back to active and the product reprices from THAT slot's current cost — handles supplier cost changes on restock.

Configurable on/off — some merchants want one-way toggles only.

Audit log
---------

[](#audit-log)

Every event writes to `etechflow_supplier_autoflow_log` with:

- Product ID + SKU
- Event type: `auto_toggle` / `reprice` / `no_active_supplier` / `error`
- Trigger source: `stock_save` / `msi_source_items_save` / `product_save` / `cron` / `cli_resync`
- Before/after active slot
- Before/after price + special\_price
- Human-readable message

Read via the admin grid (v0.1.1+ — coming next) or directly via SQL.

Companion modules
-----------------

[](#companion-modules)

- **`etechflow/module-next-day-eligibility`** — when installed, Autoflow's active-flag changes automatically trigger NDE's eligibility recompute. Recommended together for stores running dynamic next-day rules.

Versioning
----------

[](#versioning)

v0.1.0 — initial release. Engine complete; admin audit-log grid lands in v0.1.1.

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance92

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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

Every ~7 days

Total

3

Last Release

48d ago

Major Versions

0.1.0 → 1.0.02026-06-04

### Community

Maintainers

![](https://www.gravatar.com/avatar/72d596daffc1cbadfe809b006d2fc518e5ca32cdccca9485410d282898d07ba1?d=identicon)[etechflow0](/maintainers/etechflow0)

---

Top Contributors

[![Mazharsial](https://avatars.githubusercontent.com/u/227858384?v=4)](https://github.com/Mazharsial "Mazharsial (2 commits)")[![ahmed21-rg](https://avatars.githubusercontent.com/u/185612486?v=4)](https://github.com/ahmed21-rg "ahmed21-rg (1 commits)")[![ayeshanisar786](https://avatars.githubusercontent.com/u/106437953?v=4)](https://github.com/ayeshanisar786 "ayeshanisar786 (1 commits)")

### Embed Badge

![Health badge](/badges/etechflow-module-supplier-autoflow/health.svg)

```
[![Health](https://phpackages.com/badges/etechflow-module-supplier-autoflow/health.svg)](https://phpackages.com/packages/etechflow-module-supplier-autoflow)
```

###  Alternatives

[mollie/magento2

Mollie Payment Module for Magento 2

1131.9M16](/packages/mollie-magento2)[run-as-root/magento2-prometheus-exporter

Magento2 Prometheus Exporter

68357.9k](/packages/run-as-root-magento2-prometheus-exporter)[buckaroo/magento2

Buckaroo Magento 2 extension

32420.3k8](/packages/buckaroo-magento2)[opengento/module-category-import-export

This module add the capability to import and export the categories from the back-office.

1310.9k2](/packages/opengento-module-category-import-export)[loki/magento2-components

Core module for defining Alpine.js components with advanced AJAX features

1011.8k26](/packages/loki-magento2-components)[baldwin/magento2-module-url-data-integrity-checker

Magento 2 module which can find potential url related problems in your catalog data

282822.9k](/packages/baldwin-magento2-module-url-data-integrity-checker)

PHPackages © 2026

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