This module provides a modern, analytics-driven dashboard for Drupal Commerce store management. It offers instant visibility into sales, products, and orders directly within the admin interface, along with detailed reports and customer analytics.
Enhanced Commerce Management (ECPM) is a daily console for Drupal Commerce: a sales dashboard, a Needs attention queue of orders to act on, order and customer lists, sales, product, customer, order and payment reports that you can export as CSV, Views integration for building your own, and a figures check that compares the reports with the orders themselves.
Status: stable, for production use. This page describes 1.3.1. Use 1.0.0 or later: in 1.0.0-alpha1 some figures were wrong on real stores, and the lists showed every order and customer whatever Commerce's own permissions said.
Part of the Enhanced Manager Suite
The Enhanced Manager modules each rework one part of Drupal's admin and work on their own: install only the ones you need. Enhanced Manager Suite adds one dashboard that shows which of them are installed and links to each, and status blocks with each one's health.
- Enhanced Taxonomy Manager (ETM): a tree view for large taxonomy vocabularies, with merging, translations and undo.
- Enhanced Menu Manager (EMM): a tree view for large menus, with link health, delegation and undo.
- Enhanced Commerce Management (ECPM): a dashboard, order and customer lists, reports and Views data for Drupal Commerce.
- Enhanced Permission Manager (EPM): permission presets, a permissions grid, and an explorer and history of who can do what.
- Enhanced Extension Manager (EXM): a searchable module list with dependency trees and uninstall previews.
- Enhanced Manager Suite (EMS): the dashboard and status blocks that tie the family together.
- Enhanced Admin eXperience (EAX): a command palette for the admin pages.
Features
Dashboard
- At Commerce » Dashboard (
/admin/commerce/ecpm): what needs attention, when the figures were last checked against the orders, net sales, orders and average order this month against the same days of last month, today and this week, customers, store health, progress against each store's net sales goals, net sales for the last 14 days, placed orders by state, best sellers, recent orders, and an activity feed that refreshes while the tab is open. Each headline figure gives its change in words and with an arrow, says when it was computed, and links to its report. The Needs attention panel sits beside the sales chart and gives each check's state in words: OK, Needs attention, Error or Not set up. On a phone it comes first. - Every page has a store and currency switcher. Figures are computed for one store and one currency at a time, in the store's timezone: amounts in different currencies are never added together.
Needs attention
At Commerce » Needs attention (/admin/commerce/ecpm/attention), each check with the orders to act on, most urgent first:
- unpaid orders, failed payments, authorizations to capture, and canceled orders that still hold a payment (a refund is due);
- stuck orders, still in a state such as Validation or Fulfillment after a number of days;
- the number of abandoned carts, counted only, so no customer or email address is shown.
The thresholds are settings. A check that needs a module the site does not have is listed under "Not checked on this site", with what it needs, instead of showing zero. Other modules can add their own checks as tagged services.
Orders and customers
- An order list (Order browser) with search, state, date and total filters, sorting, and a panel with each order's items, totals and address, opened from each row's Details button.
- A customer list (Customer browser) with each customer's orders, net sales, and first and last order.
- Both lists keep their search, filters, sort and page in the address, so a filtered list can be reloaded or shared, and the order or customer column stays in view while a table scrolls sideways. An empty result offers Clear filters, an error offers Retry, and screen readers hear the number of results.
Reports
- Sales: by day, month, weekday and hour, a year at a glance, and order values.
- Products: best sellers, products never sold, and the catalog.
- Customers: segments, cohort retention, new and returning customers, orders per customer, and top customers.
- Orders: where the money went, orders by state, and by region. Its CSV export lists the placed orders of the report's period.
- Payments: payments recorded, amounts collected, refunds, net collected and failure rate, by payment gateway and by payment method type, with a CSV export for each. Needs Commerce Payment; failed attempts and failure rates also need Commerce Log, because a declined attempt leaves no payment, only a log entry, so failures are counted per gateway.
- CSV export from the order list, the customer list and every report.
Figures you can check
- Sales are placed orders in the states you count. Net sales are the order total minus tax, shipping and refunds recorded by Commerce Payment.
- The module keeps statistics for every placed order. Saving an order or one of its payments puts the order in a core queue, and its statistics are written right after the response, so checkout never waits for reporting and a reporting failure can never undo an order save. What is left is written on cron or by
drush ecpm:index; a write that fails is logged and tried again, and while changes are waiting, the ECPM pages and the status report say so. - The figures check works through that queue first, then reloads orders through Commerce and compares them with the statistics, column by column: missing orders, deleted ones, and figures that changed. Run it for a store, a date range and a sample or every order, re-index the orders that differ, and let cron check a sample of 100 orders each day.
- Charts are small inline SVG drawn by the module; no charting library is loaded. Each chart states its takeaway in a sentence (such as the highest and lowest day) and offers View as table; a part of a whole is shown as one stacked bar, not a donut.
Admin theme and accessibility
- ECPM's pages follow the admin theme: Claro, Default Admin (in core from Drupal 11.4) or Gin, including dark mode and the theme's density setting, with a solid focus ring and the page behind the order panel dimmed the way the theme dims it behind its own dialogs. They keep working in Windows high contrast (forced colors) and with reduced motion. The look comes from the Enhanced design language the suite shares; ECPM carries its own copy and needs no other module.
- States are given in words, never by color alone, and tables follow the theme's density. Loading indicators wait before they show, so quick answers do not flash them, and pages show placeholders while they first load.
Views integration
- Two Views base tables, Order statistics and Order item statistics, hold the same figures the dashboard and reports add up, so a site builder can build lists, charts (with a charting module such as Charts) and exports (with Views Data Export) on them. Core Views is already installed, because Commerce requires it.
- Amounts are shown in their own currency, and a summed amount is kept per currency, one row each, never added across currencies.
- Rows are limited to the orders and stores each user may view in Commerce, as on ECPM's own pages, unless the view's Disable SQL rewriting query setting is on. Set each view's access to the reports permission.
Optional: ECPM AI
The included ECPM AI submodule works through the AI module. On its AI insights page it gives a 30-day forecast, an anomaly scan, product recommendations, and answers to questions about the store's figures. It sends aggregate figures of the selected store and currency, product titles with their sales, and the question as typed; it does not send customer names, email addresses or addresses. Nothing is sent until you choose a provider on its settings page. A daily request limit and a one-hour answer cache keep provider costs down, and model output is checked and escaped before it is shown.
Requirements
- Required: Drupal core
^10.3 || ^11(Drupal 10.3 or later, or Drupal 11). ECPM does not declare Drupal 12 yet, because Drupal Commerce has no Drupal 12 release; the code is prepared for it. - Required: PHP 8.1 or later with the
bcmathextension, which Commerce requires (8.3 or later on Drupal 11). - Required: Drupal Commerce 3 (
^3), with its Commerce Order, Commerce Price, Commerce Product and Commerce Store modules. - Required: any database Drupal supports. The queries use portable SQL; the tests run on MySQL, MariaDB and SQLite.
- Optional: Commerce Payment (part of Commerce). Adds the payment report, the unpaid orders, authorizations to capture and canceled-but-paid checks, and takes refunds off net sales.
- Optional: Commerce Log (part of Commerce), with Commerce Payment. Adds the failed payments check and the payment report's failed attempts and failure rates: Commerce records no payment for a declined attempt, so it is read from the log.
- Optional: Commerce Cart (part of Commerce). Adds the abandoned carts count.
- Optional: Commerce Shipping. The region report then uses each order's shipping address instead of its billing address.
- Optional: an order workflow with a step between placing and completing an order, such as Commerce's Validation or Fulfillment workflows. The stuck orders check needs one.
- Optional: the core Help module. Shows ECPM's help page.
- Optional: Drush 12.5 or later, for
ecpm:indexandecpm:verify.
ECPM AI (submodule)
- Required: Drupal core
^10.4 || ^11(Drupal 10.4 or later, or Drupal 11), and ECPM itself. - Required: the AI module, 1.2 or later.
- Required: an AI provider for chat: a provider module for the service you use, set up with its key in the AI module, and chosen on ECPM AI's settings page. ECPM AI never falls back to the AI module's default provider on its own; choosing it is an explicit option.
Installation
- Add the module with Composer. Composer also adds Drupal Commerce 3 and what Commerce needs (Address, Entity, Entity Reference Revisions, Inline Entity Form, Profile, State Machine, Token and the
commerceguys/intllibrary) if your site does not have them yet:
composer require drupal/ecpm - Enable it. Drush also enables Commerce Order, Commerce Price, Commerce Product and Commerce Store, and the modules they need, if they are off:
drush en ecpm - ECPM reports on placed orders in a Commerce store, so the site needs a store (Commerce » Configuration » Store » Stores) and orders. Index the orders that existed before ECPM was installed; new and changed orders are recorded when they are saved:
drush ecpm:indexWithout Drush, cron indexes 250 orders per run, or use Index remaining orders now on the settings page. Until every order is indexed, the pages say how many orders they include. Keep cron running: it also works through the queue of order changes and runs the daily figures check.
- Check the settings at Commerce » Configuration » Enhanced Commerce Management (
/admin/commerce/config/ecpm): the order states that count as sales (by default every state except Draft and Canceled; leave out a state such as Validation if orders there are not yet paid), the Needs attention thresholds, each store's net sales goals, what the dashboard shows and how long figures are kept, and the daily figures check. The figures check itself is at/admin/commerce/config/ecpm/verify. - For the optional checks, enable the Commerce submodules you want, and add Commerce Shipping if you ship orders:
drush en commerce_payment commerce_log commerce_cart - Grant permissions at People » Permissions. All three are restricted: the pages show customer names, email addresses, order addresses and lifetime values.
- Use the Enhanced Commerce dashboard, order browser and customer browser (restricted): the dashboard, Needs attention, both lists and their CSV exports.
- Use the Enhanced Commerce reports and CSV exports (restricted): the five reports and their exports, the Order report's included. Give views of the order statistics this permission as their access setting too.
- Administer Enhanced Commerce Management (restricted): the settings and the figures check.
Every figure, list and export is limited to what the user may already see through Commerce, so a role also needs Commerce's View stores and an order permission: View any order, View own orders, or Order type: View orders. A role with no order permission sees empty figures.
- For ECPM AI, add the AI module and a provider module, then enable the submodule:
composer require drupal/ai drush en ecpm_aiChoose the provider and model, the daily request limit (50 by default) and caching at Commerce » Configuration » ECPM AI (
/admin/commerce/config/ecpm/ai). Grant Use ECPM AI features (restricted) to roles that also have the reports permission; each use is a billed request to your provider. The page is at/admin/commerce/ecpm/ai. - After each later update of the module, run
drush updb.
Upgrading
- From 1.0.0-alpha1: run
composer update drupal/ecpm(the package now requires Commerce 3 and Drupal 10.3 or later), thendrush updb, which creates the order statistics tables and moves the alpha's revenue goals to the default store, thendrush ecpm:index. Review the permissions: they are restricted and renamed, and users now also need Commerce's store and order permissions. ECPM AI no longer uses the AI module's default provider on its own; choose one on its settings page. The settings moved to/admin/commerce/config/ecpm. - From 1.0.0 to 1.1.0: run
drush updb. It adds the Needs attention thresholds, an index for the queue, and the daily figures check, which is on by default. - From 1.1.x to 1.2.0: run
drush updb. Update 10003 creates the queue that order statistics are now written through. Keep cron running: it also works through that queue. The Order report's CSV export now follows the report's period and needs only the reports permission. - From 1.2.x to 1.3.0: no database updates. Clear caches after updating: the libraries changed.
Similar projects
- Commerce Reporting records report data in its own table when an order is placed, and offers a sales report, a purchased-items report, promotion and tax report types, and Views integration for building your own reports. It is the established choice for figures you can rely on today; ECPM offers a ready-made dashboard for one store and currency at a time, more report types, Views data whose sums are kept per currency, and Commerce's own order access on every page and view.
- Commerce Dashboard offered a live sales dashboard, but supports only Drupal 8 and 9 and is marked unsupported.
- Commerce's order and product lists are Views, so a site builder can also build custom reports with Views.
Support and maintenance
Report bugs and ask for features in the issue queue. Each release has notes describing what changed.
This project is not covered by Drupal's security advisory policy. Until it is, security issues are handled in the public issue queue and fixed in ordinary releases.
Maintainer
Created and maintained by deadnorth at Dead North, which also takes on custom Drupal work. If this module saves you time, you can buy me a coffee.
Ask your assistant about Enhanced Commerce Management
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
- Commerce Core commerce_order
- Commerce Core commerce_price
- Commerce Core commerce_product
- Commerce Core commerce_store
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.