SyteLine Event System: Automating ERP Workflows the Supported Way
The SyteLine Application Event System is the built-in workflow engine that fires business logic automatically when things happen in the ERP - a customer order is created, a field changes, a timer elapses - without modifying vendor code. An event handler is a sequence of actions (validate, update data, send email, start an approval, call an IDO method) attached to an event, executed by the SyteLine Event Service either synchronously or in the background. Because handlers are metadata, they survive upgrades and work identically in on-prem SyteLine and multi-tenant CloudSuite Industrial, where they are often the only supported way to inject custom logic.
Events, Handlers, and Actions: The Building Blocks
Three forms define the system. Event Definitions name the trigger - standard events like CoCreated or custom events you raise from form scripts and IDO methods with FireEvent. Event Handlers attach ordered logic to an event, with activation criteria deciding whether a given firing is processed. Event Actions are the steps inside a handler, and the action palette is broad: evaluate expressions, set variables, update IDO collections, invoke IDO methods, send notifications, branch conditionally, wait for user input, or fire another event. Handlers are sequenced by handler order, so multiple handlers can respond to one event - a pattern used to keep validation, notification, and integration concerns in separate, independently maintainable handlers.
Synchronous vs Asynchronous Handlers: Choosing Correctly
The single most consequential design decision is the handler's synchronous flag. Synchronous handlers run inside the user's transaction: they can block a save by returning an error, but every millisecond they take is felt on the form. Asynchronous handlers queue to the Event Service and run in the background - right for emails, integrations, and long updates, wrong for validation.
- Use synchronous handlers only for validation and data enforcement that must block the save
- Route emails, REST calls, and cross-site updates through asynchronous handlers to keep forms fast
- A synchronous handler doing an unindexed lookup can add 2-3 seconds to every order-line save
- Asynchronous handlers retry on failure and appear in the event queue, making them auditable
Building an Approval Workflow: A Practical Pattern
Approval routing is the event system's signature use case. A typical purchase requisition approval uses a handler on the requisition status change event: actions check the requisition value, branch by threshold, create a task or notification for the approving role, then pause at a Wait For User action until the approver responds through the Inbox/Event Messages form. Escalation is handled with a timeout on the wait action - no response in 48 hours re-routes to the next approver. Manufacturers commonly deploy this for PO approvals above 10,000 dollars, engineering change (ECN) sign-offs, credit-hold releases, and new-supplier onboarding, replacing email chains that previously stretched approvals from hours into weeks.
Troubleshooting: Stuck Events and the Event Queue
When automation misbehaves, the Event Handler Activation and event queue forms are the first stop. Most stuck event problems trace to a handful of causes that are quick to check.
- Verify the SyteLine Event Service (TaskMan/Event Service) is running; if stopped, async events simply queue forever
- Check Event States for handlers stuck at a Wait action whose target user or group no longer exists
- Review activation criteria - a criteria expression that errors evaluates as not activated, silently skipping the handler
- Purge completed event states on a schedule; multi-million-row event state tables degrade the whole event system
How Netray Extends the Event System with AI Agents
Netray treats the event system as the integration point for on-prem AI. Handlers fire Netray agents that do what static actions cannot: read an inbound customer PO PDF and validate it against the order, draft a supplier expedite email with real context, or classify an NCR before routing approval. For a defense electronics builder, Netray wired an agent into the order-entry event chain that screens every new line against ITAR license records and DFARS 252.204-7012 flow-down flags, cutting compliance review time from 30 minutes per order to under 2. Netray also documents legacy handler estates - one client had 170 undocumented handlers mapped, deduplicated, and annotated in a week.
Frequently Asked Questions
What is the Application Event System in SyteLine?
It is SyteLine's built-in workflow engine. Event definitions name triggers such as record creation or a custom FireEvent call; event handlers attach ordered actions to those triggers - validating data, updating collections, sending notifications, invoking IDO methods, or pausing for approvals. Handlers are stored as metadata, so they survive upgrades and are fully supported in multi-tenant CloudSuite Industrial, where direct code customization is restricted.
Why is my SyteLine event handler not firing?
Check four things in order: the handler is active and attached to the correct event definition; the activation criteria expression evaluates true for your test case (an erroring expression silently skips the handler); the Event Service is running if the handler is asynchronous; and no earlier handler in the sequence errored or halted processing. The Event States and event queue forms show exactly where processing stopped.
Should SyteLine event handlers be synchronous or asynchronous?
Synchronous handlers run inside the user's transaction, so use them only when the logic must block the save - validations and hard business rules. Everything else - emails, REST integrations, cross-site updates, document generation - belongs in asynchronous handlers, which queue to the Event Service, retry on failure, and never slow the form. Misusing synchronous handlers is the most common cause of slow SyteLine order entry.
Key Takeaways
- 1Events, Handlers, and Actions: The Building Blocks: Three forms define the system. Event Definitions name the trigger - standard events like CoCreated or custom events you raise from form scripts and IDO methods with FireEvent.
- 2Synchronous vs Asynchronous Handlers: Choosing Correctly: The single most consequential design decision is the handler's synchronous flag. Synchronous handlers run inside the user's transaction: they can block a save by returning an error, but every millisecond they take is felt on the form.
- 3Building an Approval Workflow: A Practical Pattern: Approval routing is the event system's signature use case. A typical purchase requisition approval uses a handler on the requisition status change event: actions check the requisition value, branch by threshold, create a task or notification for the approving role, then pause at a Wait For User action until the approver responds through the Inbox/Event Messages form.
Have Netray map your SyteLine event handler estate and show where AI agents can replace brittle handler logic with intelligent automation.
Related Resources
The SyteLine Mongoose Framework: A Developer Guide
Complete developer guide to the SyteLine Mongoose framework: IDOs, WinStudio forms, application events, and scripting in Infor CloudSuite Industrial.
Infor SyteLineSyteLine ION API Integration Guide
Step-by-step SyteLine ION API integration guide: API gateway setup, OAuth 2.0 tokens, BODs vs IDO endpoints, and secure on-prem to cloud connections.
Infor SyteLineSyteLine Document Management & Automation
Automate SyteLine document management: attached documents, Infor Document Management (IDM) integration, revision control, and ITAR-safe file handling.