MES Integration Layer — Overview & module guide

Module: MES Integration Layer v1.4.0

Manufacturing Execution System integration layer for BIXCRM — endpoints, event catalog, sync log, and manufacturing hooks

Screen-by-screen guides (each tab explained)

Click a menu item below for step-by-step instructions on that MES Integration Layer screen:

How to use in BIXCRM (daily operations)

  1. Sign in to the admin area with a role that includes MES Integration Layer permissions.
  2. Open Mes (sidebar) or search for MES Integration Layer in the admin menu.
  3. Start on the Dashboard (if available) to see open tasks, pending approvals, and KPIs.
  4. Review Settings after upgrades — new options may need defaults for your company.
  5. Create or import master data first; most modules block transactions until masters exist.
  6. Run the main business flow (create → submit → approve → post/complete) using the screens listed in Admin menu below.
  7. Use Reports / Analytics screens to reconcile stock, finance, compliance, or SLA metrics.
  8. For integrations (API, EDI, gateways, tax), confirm credentials in Settings and monitor logs or webhook delivery screens.
  9. Train staff with role-based access — give approvers approve permissions only, operators create/edit on their area.
  10. If something fails overnight, check BIXCRM cron ran and open the module log / failed queue screen if present.

Admin menu — where to work

Open the MES Integration Layer section in the admin sidebar. Screens your staff may use (depending on role):

  • API Keys
  • Event Routing
  • Field Mappings
  • Integration Dashboard
  • Integration Events
  • Integration Reports
  • MES
  • MES Endpoints
  • Outbound Webhooks
  • Settings

Detailed guide — features, workflows, API & FAQ

Features (Phase 1–5)

  • MES Endpoints — REST, MQTT, OPC-UA, SOAP, Webhook, SFTP, Local
  • Event Dispatcher — Outbound via REST, Webhook, MQTT, SFTP, Local folder
  • Inbound Webhook — Receive shop-floor events from external MES
  • REST API — Read endpoints/events, submit events, APS schedule sync
  • Outbound Webhooks — event.queued, event.processed, event.failed
  • Field Mapping — Transform payload fields per endpoint/event type
  • Multi-Plant Routing — Route by plant_id when Multi-Plant module active
  • Integration Reports — Endpoint SLA, error rates, archive stats
  • SFTP / Local Transport — File-based inbound/outbound with cron polling
  • Retry Queue — Exponential backoff for failed outbound events
  • Credential Encryption — Secure storage of endpoint secrets
  • Event Archive — Archive processed events before retention purge
  • Dashboard — Integration stats, status chart, recent events
  • Permissions — Role-based access for all MES features

Requirements

  • BIXCRM 2.3+ (tested on 3.4.1)
  • PHP 8.1+
  • Optional: Manufacturing module for shop-floor event capture

Usage

Configure an MES Endpoint

  1. Go to MES Integration Layer → MES Endpoints
  2. Click New MES Endpoint
  3. Enter endpoint code, name, vendor, and protocol
  4. Fill protocol-specific configuration
  5. Save

Enable Manufacturing Sync

  1. Ensure Manufacturing module is active
  2. Go to Settings
  3. Enable Manufacturing Sync
  4. Shop-floor events (work orders, QC, downtime, IoT) will be queued automatically

View Integration Events

Go to MES Integration Layer → Integration Events to view, create manual test events, or reprocess failed events.

Architecture

Manufacturing Module          MES Integration Layer          External MES
     (hooks)          →       (event queue)          →      (Phase 2+)
  work_order_*                  mes_events                    REST/MQTT/etc.
  qc_failed                     mes_endpoints
  downtime_*                    mes_event_types
  iot_reading

No core BIXCRM or Manufacturing files are modified. Integration uses existing do_action hooks from the Manufacturing module.

Inbound Webhook Example

curl -X POST "https://your-crm.com/mes/mes_webhook/receive" \
  -H "Content-Type: application/json" \
  -H "X-MES-Token: YOUR_WEBHOOK_SECRET" \
  -d '{
    "event_ref": "MES-EXT-1001",
    "event_code": "operation_scan",
    "payload": {
      "scan_code": "OP:123",
      "action": "start",
      "work_order_id": 10,
      "operation_id": 123
    }
  }'

Supported inbound events: operation_scan, iot_reading_ingested, downtime_started, downtime_ended, qc_result, qc_failed.

Roadmap

See [docs/ROADMAP.md](docs/ROADMAP.md) for the full phase plan.

PhaseStatus
---------------
1 — Foundation✅ Complete
2 — Event Dispatcher✅ Complete
3 — Inbound Sync✅ Complete
4 — Transport & Retry✅ Complete
5 — API & EnterprisePlanned

Features

Manufacturing Execution System integration layer for BIXCRM — endpoints, event catalog, sync log, and manufacturing hooks

  • **MES Endpoints** — REST, MQTT, OPC-UA, SOAP, Webhook, SFTP, Local
  • **Event Dispatcher** — Outbound via REST, Webhook, MQTT, SFTP, Local folder
  • **Inbound Webhook** — Receive shop-floor events from external MES
  • **REST API** — Read endpoints/events, submit events, APS schedule sync
  • **Outbound Webhooks** — `event.queued`, `event.processed`, `event.failed`
  • **Field Mapping** — Transform payload fields per endpoint/event type
  • **Multi-Plant Routing** — Route by `plant_id` when Multi-Plant module active
  • **Integration Reports** — Endpoint SLA, error rates, archive stats
  • **SFTP / Local Transport** — File-based inbound/outbound with cron polling
  • **Retry Queue** — Exponential backoff for failed outbound events
  • **Credential Encryption** — Secure storage of endpoint secrets
  • **Event Archive** — Archive processed events before retention purge
  • **Dashboard** — Integration stats, status chart, recent events
  • **Permissions** — Role-based access for all MES features

Permissions

Granular staff capabilities are registered on activation. Assign them under Setup → Staff → Roles for the MES Integration Layer capability group.

Typical capabilities include view, create, edit, delete, plus module-specific actions (approve, export, settings, API access).

Cron Jobs

Background tasks (if enabled) run through BIXCRM's main cron. Example crontab (every 5 minutes):

* * * * * php /path/to/bixcrm/index.php cron/index > /dev/null 2>&1

Check module settings for scheduled jobs (alerts, sync, reports, retention).

After activation — configuration checklist

  1. Go to Setup → Modules and activate MES Integration Layer.
  2. If prompted, click Upgrade Database or reload admin — migrations run automatically.
  3. Assign permissions under Setup → Staff → Roles.
  4. Open the module menu and configure settings.
  5. BIXCRM 3.0+
  6. PHP 7.4+ (8.1+ recommended)
  7. MySQL 5.7+ / MariaDB 10.3+ (InnoDB)
  8. PHP extensions: mysqli, json, mbstring, curl, fileinfo

Staff permissions (from module)

Assign under Setup → Staff → Roles. Each feature can expose different actions:

FeatureActions
Integration Dashboard
mes_dashboard
view
MES Endpoints
mes_endpoints
view, create, edit, delete
Integration Events
mes_events
view, create, edit, delete, reprocess
Settings
mes_settings
view, edit
Event Routing
mes_event_routes
view, create, edit, delete
Outbound Webhooks
mes_webhooks
view, create, edit, delete
Field Mappings
mes_field_mappings
view, create, edit, delete
Integration Reports
mes_reports
view

One-time setup (first time only)

  1. Setup → Modules → activate MES Integration Layer.
  2. Setup → Staff → Roles → assign MES Integration Layer permissions (view, create, edit, delete, approve, export, settings as needed).
  3. Open MES Integration Layer → Settings and complete company defaults, prefixes, integrations, and notification options.
  4. Create master data (warehouses, products, templates, accounts, routes, etc.) before processing live transactions.
  5. Enable BIXCRM cron (php /path/to/bixcrm/index.php cron/index) for sync, retries, alerts, and scheduled jobs.
  6. Optionally enable REST API / webhooks in module settings if you integrate external systems.

BIXCRM Knowledge Base — usage guide generated from module README and documentation.

Did you find this article useful?