Automation
SyteLine Workflow Event Handlers: set up email notifications, and change the message safely
Applies to: SyteLine 8, 9 and 10. Email delivery needs SMTP configured for the site.
Short answer
SyteLine ships with ready-made notifications, called workflow event handlers, for events such as a new customer being created or a purchase order due date changing. Open the Workflow Event Handler Activation form, pick the handler, enter SyteLine user names in Notify Users (Inbox messages) and/or addresses in Email Users (external email), fill in any other values it asks for, select Active and save. To change the wording, don't edit the standard handler. Use Copy for Modification and edit the copy on the Event Handlers form.
What workflow event handlers are
They're prebuilt notifications that sit on top of SyteLine's event system. Each one watches a specific event on a specific IDO and sends a message when it fires. A few examples from Infor's documentation:
| Handler | Fires when | Event and IDO |
|---|---|---|
| Notify Customer Created | A new customer is added | Post-insert on SLCustomers |
| Notify Item Created | A new item is added | Insert on SLItems |
| Notify PO Line Due Date Changed | A PO line's due date changes | Update on SLPoitems |
| Notify PO Line Received for an Item | A PO line containing chosen items is received | PurchaseOrderLineItemReceived on the poitem table |
The message can go to the SyteLine Inbox form, to an external email address, or both. Some handlers also take extra settings, such as which items to watch or a discount percentage that triggers an approval.
Switching one on
- Open Workflow Event Handler Activation.
- Select the handler you want.
- Fill in who gets told: - Notify Users: SyteLine user names, separated by semicolons, for Inbox messages. - Email Users: email addresses, separated by semicolons, for external email.
- Fill in any other fields that handler needs, for example the items to watch for "PO Line Received for an Item."
- Select Active.
- Choose Actions > Save.
- Test it: perform the action in your test environment and confirm the message arrives.
One handler can have more than one row. Some handlers watch both new and changed records, so they appear twice on the form, once for each event. When you fill in the values on one row, the other updates to match, but you activate each row separately. If a notification works for new records and not for changes, this is usually why.
Where the "From" address comes from
For an email, the sender is normally the email address of the SyteLine user who did the action, taken from their user record. If that user has no email address, or SyteLine can't tell who did it, a default address is used instead. In some cases that default is the SMTP user configured for the site. If your notifications arrive "from" an odd address, or get caught by spam filters, check the user records and the site's email settings first.
Changing the message safely
You can't edit the standard handlers directly, and you shouldn't try to. Infor's method:
- On Workflow Event Handler Activation, select the handler and fill in Notify Users / Email Users and any other values. Don't select Active.
- Click Copy for Modification. SyteLine makes a copy of the handler and its actions. The copy has the same description but a different sequence number, and it's marked as yours rather than SyteLine's, so you're allowed to change it.
- Open the Event Handlers form and find the copy. It won't appear on the Workflow Event Handler Activation form, which catches people out.
- Change what you need: - Update the description so you can tell it apart from the original. - To change the message, select the Notify action and open Event Actions. Most standard messages are stored as message strings so they can be translated, so you're editing the action's parameters, not a plain-text template. - Add or reorder actions if you need extra steps.
- Select Active on the Event Handlers form.
- Test it by doing the action that triggers it.
Make sure only one version is active. If both the original and your copy are active, people get two messages.
When a notification doesn't arrive
Work through it in this order:
- Is the right row active? Check every row for that handler (see above).
- Did the event actually happen? For example, "PO Line Due Date Changed" won't fire if the line was created with that date, only if it was changed.
- Does Inbox work but not email? Then the handler is fine. The problem is email delivery: SMTP settings, the sender address, or spam filtering.
- Was the change made outside the application? Most handlers watch IDO events, which fire when records are saved through SyteLine. A change written straight to the database with SQL bypasses the IDO, so the event never fires. That's one more reason not to update SyteLine tables directly.
- Is the event system healthy? On-premises, the Infor Framework Event Service needs to be running.
When a standard handler isn't enough
If none of the standard handlers fit, such as an alert when a note is added to a service order, or a daily digest instead of one email per change, you need a custom event handler built on the event system. That's a development job: choosing the right IDO event, testing that it fires for every way users make the change, and making sure it doesn't slow down saving. It's well worth scoping properly before anyone starts building. See How to scope a SyteLine request for a fixed price.
FAQ
How do I set up email notifications in SyteLine?
Use the Workflow Event Handler Activation form. Pick a handler, enter addresses in Email Users (or user names in Notify Users for the Inbox), select Active and save.
Why does my SyteLine workflow notification only work sometimes?
Many handlers have separate rows for new and changed records, and each row has to be activated on its own.
How do I change the text of a SyteLine workflow email?
Use Copy for Modification, then edit the copy's Notify action on the Event Handlers form. Don't edit the standard handler.
Why can't I find my copied event handler?
Copies don't appear on the Workflow Event Handler Activation form. Open the Event Handlers form instead.