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:
- Integration Dashboard
- MES Endpoints
- Integration Events
- Event Routing
- Field Mappings
- Outbound Webhooks
- Integration Reports
- API Keys
- Settings
How to use in BIXCRM (daily operations)
- Sign in to the admin area with a role that includes MES Integration Layer permissions.
- Open Mes (sidebar) or search for MES Integration Layer in the admin menu.
- Start on the Dashboard (if available) to see open tasks, pending approvals, and KPIs.
- Review Settings after upgrades — new options may need defaults for your company.
- Create or import master data first; most modules block transactions until masters exist.
- Run the main business flow (create → submit → approve → post/complete) using the screens listed in Admin menu below.
- Use Reports / Analytics screens to reconcile stock, finance, compliance, or SLA metrics.
- For integrations (API, EDI, gateways, tax), confirm credentials in Settings and monitor logs or webhook delivery screens.
- Train staff with role-based access — give approvers approve permissions only, operators create/edit on their area.
- 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_idwhen 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
- Go to MES Integration Layer → MES Endpoints
- Click New MES Endpoint
- Enter endpoint code, name, vendor, and protocol
- Fill protocol-specific configuration
- Save
Enable Manufacturing Sync
- Ensure Manufacturing module is active
- Go to Settings
- Enable Manufacturing Sync
- 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.
| Phase | Status |
|---|---|
| ------- | -------- |
| 1 — Foundation | ✅ Complete |
| 2 — Event Dispatcher | ✅ Complete |
| 3 — Inbound Sync | ✅ Complete |
| 4 — Transport & Retry | ✅ Complete |
| 5 — API & Enterprise | Planned |
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
- Go to Setup → Modules and activate MES Integration Layer.
- If prompted, click Upgrade Database or reload admin — migrations run automatically.
- Assign permissions under Setup → Staff → Roles.
- Open the module menu and configure settings.
- BIXCRM 3.0+
- PHP 7.4+ (8.1+ recommended)
- MySQL 5.7+ / MariaDB 10.3+ (InnoDB)
- PHP extensions: mysqli, json, mbstring, curl, fileinfo
One-time setup (first time only)
- Setup → Modules → activate MES Integration Layer.
- Setup → Staff → Roles → assign MES Integration Layer permissions (view, create, edit, delete, approve, export, settings as needed).
- Open MES Integration Layer → Settings and complete company defaults, prefixes, integrations, and notification options.
- Create master data (warehouses, products, templates, accounts, routes, etc.) before processing live transactions.
- Enable BIXCRM cron (
php /path/to/bixcrm/index.php cron/index) for sync, retries, alerts, and scheduled jobs. - Optionally enable REST API / webhooks in module settings if you integrate external systems.
BIXCRM Knowledge Base — usage guide generated from module README and documentation.