# berrypath/magento2-berrypath-flow

> BerryPath guided selling flows and product finders for Magento 2.

`composer require berrypath/magento2-berrypath-flow`

Canonical URL: https://packagento.com/berrypath/magento2-berrypath-flow

## At a glance

- **Vendor**: berrypath (https://packagento.com/berrypath.md)
- **Latest version**: 1.0.5 — released 2026-07-21
- **Pricing**: Free
- **Package type**: Magento 2 module
- **Status**: active, accepting new buyers

## Installation

Packagento is licence-gated, so even free packages need a licence on a project before Composer can resolve them.

1. **Sign in or create an account** at https://packagento.com/customer/account/.

2. **Add the package to your account.** Open https://packagento.com/berrypath/magento2-berrypath-flow and complete the free checkout. A licence is minted automatically.

3. **Create or pick a project, then activate the licence on it.**
   - Projects represent the Magento installs you deploy to. Manage them at https://packagento.com/projects/.
   - Activate the new licence on the project you'll deploy this package to. Activation is what generates the Composer credentials scoped to that project.

4. **Add the project credentials to your Magento codebase.**

   Grab the project's public + private key from https://packagento.com/projects/ (open the project, then its Credentials tab), and add them to `auth.json`:

   ```json
   {
     "http-basic": {
       "packagento.com": {
         "username": "ppk_live_...",
         "password": "psk_live_..."
       }
     }
   }
   ```

   Add the Packagento Composer repository to `composer.json`:

   ```json
   {
     "repositories": [
       { "type": "composer", "url": "https://packagento.com" }
     ]
   }
   ```

5. **Install and apply.**

   ```bash
   composer require berrypath/magento2-berrypath-flow:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

BerryPath guided selling flows and product finders for Magento 2.

## README

![BerryPath Guided Selling Flows for Magento 2](docs/banner-1544x500.png)

Help shoppers choose the right product with guided selling flows on Magento category pages, product pages, and CMS content.

New to BerryPath? A free plan is available with **1 guided selling flow and up to 2,500 products**. Existing customers keep using their current plan.

- [Start for free](https://app.berrypath.eu/register)
- [Magento setup guide](https://www.berrypath.eu/docs/magento-module)
- [Live demo](https://www.berrypath.eu/demo/category)

### Guide shoppers where decisions happen

- **Category pages:** narrow a large collection before filters and product grids become overwhelming.
- **Product pages:** confirm whether the current product fits and guide shoppers to stronger alternatives.
- **CMS content:** turn homepages, buying guides, landing pages, and campaigns into interactive product advice.
- **Popup, sidebar, or inline:** choose the experience that best fits the page and storefront theme.

### Built for Magento teams

- Configure global market, locale, placement, and product identifier defaults per Magento scope.
- Assign a different BerryPath Flow UUID to individual products and categories.
- Place flows in CMS content with the Magento `BerryPath Flow` widget.
- Match the current product by Magento product ID, SKU, or another product attribute.
- Measure assisted order value from the Magento checkout success page.
- Connect Magento product data with the included BerryPath Product Feed module.
- Add Hyva storefront support with the optional compatibility package.

### How it works

1. Build and publish a guided selling flow in BerryPath.
2. Copy its BerryPath Flow UUID or published widget URL.
3. Add it to a Magento category, product, or CMS widget.
4. Test the shopper journey and use BerryPath analytics to improve it.

A BerryPath account is required to build and publish guided selling flows.

### Installation

```bash
composer require berrypath/magento2-berrypath-flow
bin/magento module:enable BerryPath_Flow
bin/magento setup:upgrade
bin/magento cache:flush
```

For local `app/code` development, place the module at:

```text
app/code/BerryPath/Flow
```

The Composer package installs `berrypath/magento2-berrypath-product-feed` as a dependency.

### Configuration

Store defaults:

```text
Stores > Configuration > BerryPath > Flow
```

Configure the global enable switch, market code, locale, category and product placements, product ID source, and assisted conversion measurement here. Settings support Magento default, website, and store-view scope.

Place a flow:

```text
Category: Catalog > Categories > BerryPath Flow
Product:  Catalog > Products > BerryPath Flow
CMS:      Content > Widgets > Add Widget > BerryPath Flow
```

Paste the public token, share URL, or embed URL from a published BerryPath flow. If no BerryPath Flow UUID is configured for the current placement, the module renders nothing.

The locale setting is sent as `data-berrypath-locale`. Leave it empty to derive the primary language from the Magento store locale—for example, `de_DE` becomes `de`.

### Product feed

Manage product feeds from:

```text
Catalog > BerryPath > Product Feeds
```

Create separate feeds for store views and channels, select the product attributes BerryPath needs for matching, and generate XML, CSV, or JSON output manually or through Magento cron.

See the [`berrypath/magento2-berrypath-product-feed`](https://github.com/BerryPath/magento2-berrypath-product-feed) package for detailed feed configuration.

### Hyva compatibility

For Hyva storefronts, install the separate compatibility module:

```bash
composer require berrypath/magento2-berrypath-flow-hyva-compat
bin/magento module:enable BerryPath_FlowHyvaCompat
bin/magento setup:upgrade
bin/magento cache:flush
```

The package replaces the standard frontend templates through `hyva-themes/magento2-compat-module-fallback` while keeping the same placements and configuration.

### External service and privacy

The module loads the [BerryPath embed script](https://www.berrypath.eu/embed/berrypath.js) only when a guided selling flow or assisted conversion event is used. BerryPath receives the configured flow token, locale, market code, and product identifier required to display and match the selected flow.

When assisted conversion measurement is enabled, the Magento checkout success page sends the order total and configured product identifiers to BerryPath. Customer names, email addresses, postal addresses, and payment details are not included. Measurement can be disabled in the module settings.

- Service provider: [BerryPath](https://www.berrypath.eu)
- [Terms and conditions](https://www.berrypath.eu/terms)
- [Privacy statement](https://www.berrypath.eu/privacy)

### Screenshots

Ask relevant, easy-to-answer questions:

![Guided selling question](docs/screenshots/guided-question.png)

Turn shopper answers into focused product recommendations:

![Guided selling recommendations](docs/screenshots/recommendation-results.png)

Place guided selling in Magento CMS content, category pages, and product pages:

![Homepage CMS widget](docs/screenshots/homepage-widget.png)

![Category page widget](docs/screenshots/category-widget.png)

![Product page widget](docs/screenshots/product-widget.png)

### License

MIT. See [LICENSE](LICENSE).

## Recent Versions

| Version | Released |
|---|---|
| 1.0.5 | 2026-07-21 |
| 1.0.4 | 2026-06-30 |
| 1.0.3 | 2026-06-25 |
| 1.0.2 | 2026-06-20 |
| 1.0.1 | 2026-06-16 |
| 1.0.0 | 2026-06-14 |

## Dependencies

### Require

| Package | Constraint |
|---|---|
| berrypath/magento2-berrypath-product-feed | ^1.0 |
| php | >=8.1 |

### Suggest

| Package | Constraint |
|---|---|
| berrypath/magento2-berrypath-flow-hyva-compat | Hyva compatibility for BerryPath Flow. |

## Quality

Latest release (1.0.5) fails the Packagento QA pipeline. Verdicts below are per-cell (Magento line × PHP version) for the matrixed tools, and run-once for the static / security tiers.


### Compatibility

Each Magento line is installed on its supported PHP versions, then the module is built (DI compile + static-content deploy). Cells show passed / failed / untested; staircase gaps render as `–`.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | Pass | Pass | – | – |
| 2.4.8 | – | Pass | Pass | – |
| 2.4.9 | – | – | Pass | Pass |


### Code Quality

Advisory checks against the module's source. Never affect the Compatibility verdict — a phpcs finding can't make a module incompatible.

#### Static Analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Fail | 24 | 2 errors, 22 warnings (ruleset: Magento2), 8 auto-fixable with phpcbf |
| PHPMD | Warning | 1 | 1 rule violation (UnusedPrivateField:1) |
| Cpd | Pass | 0 |  |
| Composer validate | Info | 1 | valid; 1 advisory note (composer validate --strict) |

#### PHPStan

Type-checks the module against a real Magento install. Re-runs per Magento + PHP version because resolvable symbols differ between releases.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | 18 | 18 | – | – |
| 2.4.8 | – | 18 | 18 | – |
| 2.4.9 | – | – | 18 | 18 |


### Tests

Unit and integration suites run per Magento + PHP cell. Test failures speak to the module's behaviour, not its compatibility with a line, so they're reported here separately.

#### Unit Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |

#### Integration Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |


### Security

Dependency-advisory audit (composer audit) plus a source malware scan. A malware detection fails the version outright.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| Composer audit | Pass | 0 |  |
| Malware scan | Pass | 0 |  |

## Licence and pricing

Free. A licence is still minted on checkout and bound to your project for Composer access — no payment step.

Refundable within 14 days of first purchase via https://packagento.com/account/refunds/.

## Install via Claude Code or any MCP client

The Packagento MCP server can run the licence + project + Composer steps above in one tool call:

```
purchase_and_install_packages(
  composer_names=["berrypath/magento2-berrypath-flow"],
  project_id="proj_xxx"
)
```

This handles cart, checkout, licence minting, project activation, and writes auth.json credentials. Connect a client with `claude mcp add packagento https://mcp.packagento.com`. Full setup at https://packagento.com/docs/mcp-setup.

## Vendor

berrypath is a Magento 2 vendor on Packagento. See https://packagento.com/berrypath.md for their full catalogue.

