Closing the ERP/CMMS loop with Guidewheel
Guidewheel documents two integration patterns. Both are one-directional pipes in most deployments; a Daslab agent turns them into closed loops.
Pattern 1 — Planned orders in, actuals out (ERP)
The pipe: push planned orders from the ERP into Guidewheel; pull actuals — good units, scrap, runtime — back out to reconcile.
As an agent flow:
guidewheel_list_production_entries(unix-msfrom_ts/to_ts) +guidewheel_list_scraps(ISO 8601from/to— a different convention on purpose) over the last shift.guidewheel_list_shiftsreturns shift definitions with start and end clock times, not occurrences, so derive the concrete window from those.- Match entries to orders by SKU (
guidewheel_list_skus— the ERP is the source of truth for SKUs;guidewheel_create_skusyncs new ones in). - Post confirmations into the ERP with that system's provider — e.g. production order confirmations in SAP S/4HANA via Daslab's SAP tools.
- Write the ERP document number back onto the Guidewheel side where useful.
OEE reporting is the same read set: uptime (guidewheel_get_device_uptime, group_by=day) × production entries × scrap, computed in the agent — Guidewheel has no computed-OEE endpoint. Uptime hands you availability directly in computedLoadStates.percentages, and each production entry carries its own oee block, so the agent mostly has to reconcile rather than derive from scratch.
Pattern 2 — Downtime issue → work order, status back (CMMS)
The pipe: when a machine goes down, create a work order in the CMMS; sync its status back.
As an agent flow:
- Poll
guidewheel_list_issuesfor new downtime events (no webhooks — schedule the poll, and size the interval against the 1000 calls/day budget). - Triage with context: the machine (
guidewheel_list_devices), its recent load states (guidewheel_get_device_statefor one machine, orguidewheel_get_load_statesfor the whole fleet in a single call), the tagged reason from the issue'stags[].tagname, and prior issues on the samedeviceid. - Create the maintenance object in the target system — a CMMS work order, or a maintenance notification in the ERP.
- Write back:
guidewheel_update_issuewith the work-order number and status, so the floor view and the maintenance system stay aligned. Issues are full CRUD precisely for this.
Why an agent instead of a point integration
The glue work between the two systems — matching a downtime reason to a damage code, deciding whether a 4-minute idle is worth a work order, reconciling a shift's entries against an order — is judgment, not mapping. A Daslab scene holds both connections (Guidewheel + the ERP/CMMS) as assets, and the agent applies that judgment per event, with every write gated by the scene's approval rules.
Practical notes
- Timestamps: two conventions that are not interchangeable — unix epoch milliseconds as
from_ts/to_tson load states, uptime, energy, issues and production entries; ISO 8601 strings asfrom/toon telemetry and scraps. The wrong one returns a 400. - Multiple tenants: each Guidewheel account asset is one tenant, and tools resolve the credential from the account in scope.
- Schema drift: field names vary by tenant configuration. If a documented parameter is rejected, probe the live surface with
guidewheel_api_getand adapt — write tools take a passthroughfieldsobject for exactly this reason. - No paging: there is no
limit/page/offseton any endpoint. Lists come back whole; narrow with a time range or filter client-side.