conneqt/m2-status-monitoring

Conneqt Status Monitoring Module for Magento 2

Maintainers

Package info

git.dev.epartment.nl/conneqt/m2-status-monitoring

Homepage

Issues

Type:magento2-module

pkg:composer/conneqt/m2-status-monitoring

Transparency log

Statistics

Installs: 7 395

Dependents: 0

Suggesters: 0

1.3.5 2026-04-02 07:10 UTC

README

Conneqt_StatusMonitoring helps Magento administrators keep track of orders that are stuck before or during ERP synchronisation.

The module has two main jobs:

  1. send email notifications for orders that have remained in selected statuses for too long;
  2. retry ERP pickup by refreshing the updated_at timestamp of selected orders, either automatically or manually from the admin.

What the module does

This module is meant for shops that use Conneqt as part of their order/ERP integration flow.

It monitors orders that appear to be stalled and gives you two ways to react:

  • Notification flow: periodically email a list of orders that are still in configured statuses after a configurable amount of time.
  • Retry flow: update the order timestamp so external integrations that look at sales_order.updated_at can pick the order up again.

It also tracks how many times an order has been retried. When the configured maximum is reached, the module moves the order to a configurable failed status.

How it works

1. Email notification flow

The email notification cron looks for orders that:

  • have one of the configured statuses;
  • were updated before the configured "Updated Before" value;
  • were updated after the configured "Updated After" value;
  • were created after the configured "Created After" value.

When matching orders are found, the module sends an email containing the order increment IDs to the configured recipients.

Main files involved:

  • Cron/OrderStatus.php
    Collects the orders, applies the date/status filters, and sends the email.
  • etc/crontab.xml
    Registers the scheduled job conneqt_statusmonitoring_orderstatus. The schedule is read from config.
  • view/frontend/email/conneqt_statusmonitoring_orderstatus.html
    Email template used for the notification message.
  • Helper/ScopeConfigHelper.php
    Reads the notification-related configuration values and fallback defaults.

2. Automatic retry flow

The retry flow is intended for orders that should be picked up again by Conneqt/ERP processing.

Every minute, the retry cron checks whether the feature is enabled. If it is, the executor searches for orders in the configured statuses whose updated_at value is older than the configured retry interval.

For each matching order, the module:

  1. records or increments the retry counter in its own table;
  2. refreshes the order's updated_at timestamp so downstream integrations can see it as changed again;
  3. if the retry count has reached the configured maximum, changes the order to the configured failed status instead of retrying it again.

Main files involved:

  • Cron/UpdateOrderTimestamp.php
    Small cron wrapper that checks the feature toggle and calls the executor.
  • Executor/UpdateOrderTimestamp.php
    Contains the main retry logic: selecting orders, counting attempts, updating timestamps, and setting the failed status when needed.
  • Console/Command/UpdateOrderTimestamp.php
    Adds the CLI command conneqt:update:order:timestamp so the retry logic can also be run manually.
  • etc/crontab.xml
    Schedules the retry job to run every minute.
  • etc/db_schema.xml
    Defines the conneqt_update_timestamp_attempts table used to store retry counts per order.

3. Manual retry tools in the admin

Besides the cron-based retry process, the module adds admin actions that let a user manually retry orders by updating their updated_at value.

  • On the Magento sales order grid, a mass action is added so multiple orders can be retried at once.
  • A dedicated Hyvä Admin grid shows orders that are still pending for longer than one hour.
  • Both the single-order and mass retry actions update the order timestamp directly in the sales_order table.

Main files involved:

  • Controller/Adminhtml/Order/Retry.php
    Retries a single order by refreshing its timestamp.
  • Controller/Adminhtml/Order/MassRetry.php
    Retries multiple selected orders.
  • view/adminhtml/ui_component/sales_order_grid.xml
    Adds the "Conneqt Retry Order" mass action to the default Magento sales order grid.
  • view/adminhtml/hyva-grid/pending-grid.xml
    Defines the Hyvä Admin grid and its retry actions.
  • Grid/Processor/FilterPendingOrders.php
    Applies the pending/stale order filters for the Hyvä grid source.
  • Controller/Adminhtml/Grid/Index.php
    Entry controller for the custom admin page.
  • view/adminhtml/layout/conneqt_statusmonitoring_grid_index.xml
    Renders the Hyvä grid page in the admin.
  • etc/adminhtml/menu.xml and etc/adminhtml/routes.xml
    Register the admin menu item and route.

Configuration

The module configuration is available in the Magento admin under the Conneqt configuration section.

Main configuration groups:

  • Settings
    • enable/disable logging;
  • Email Notification
    • enable notifications;
    • configure recipient email addresses;
    • choose which order statuses to monitor;
    • set the cron expression;
    • set the date windows used for filtering orders;
  • Update Order Timestamp
    • enable automatic retries;
    • choose retryable statuses;
    • choose the failed status;
    • set the retry interval in minutes;
    • set the maximum number of retries.

Important config files:

  • etc/adminhtml/system.xml
    Defines the admin configuration fields.
  • etc/config.xml
    Provides the default values.
  • Helper/ScopeConfigHelper.php
    Central place where those values are read in PHP.

Important files at a glance

FilePurpose
etc/module.xmlRegisters the module and its dependency order (Conneqt_Base, Hyva_Admin).
registration.phpMagento module registration entry point.
Cron/OrderStatus.phpNotification cron logic for stale orders.
Cron/UpdateOrderTimestamp.phpCron entry point for the retry flow.
Executor/UpdateOrderTimestamp.phpMain retry/fail workflow implementation.
Console/Command/UpdateOrderTimestamp.phpCLI command to trigger retries manually.
Helper/ScopeConfigHelper.phpReads module configuration and fallback defaults.
Helper/LogHandler.phpWrites module logs to Magento logging and optional console output.
Controller/Adminhtml/Order/Retry.phpSingle-order manual retry action.
Controller/Adminhtml/Order/MassRetry.phpBulk manual retry action.
view/adminhtml/ui_component/sales_order_grid.xmlAdds a retry mass action to the Magento sales order grid.
view/adminhtml/hyva-grid/pending-grid.xmlDefines the custom Hyvä admin grid for pending orders.
Grid/Processor/FilterPendingOrders.phpRestricts the Hyvä grid to old pending orders.
etc/db_schema.xmlCreates the retry-attempt tracking table.
Setup/Patch/Data/AddSapOrderStatuses.phpCreates the custom Conneqt order statuses used by the module.
view/frontend/email/conneqt_statusmonitoring_orderstatus.htmlEmail template for stale-order notifications.

Custom statuses and retry tracking

During setup, the module creates the following order statuses:

  • conneqt_ready
  • conneqt_accepted
  • conneqt_failed

These are created in Setup/Patch/Data/AddSapOrderStatuses.php.

Retry attempt counts are stored in the conneqt_update_timestamp_attempts table, defined in etc/db_schema.xml.

Requirements

From this package's metadata:

  • Magento 2 framework
  • conneqt/m2-base
  • hyva-themes/module-magento2-admin

See composer.json for the exact package constraints.