Webhooks provide a way to notify an external system about events in Eton. This option does not require any extra integration development, but has a few limitations.
When a webhook triggers, the message is put on a queue to be sent to the external system. By default a message will retry an infinite number of times if there is no response from the external system (connection timeout). If there is an error response like a 404 or 500, the message will attempt to send 5 times before giving up and moving to the next in the queue.
Messages are sent using HTTP POST. Additional authentication or content HTTP headers may be specified.
When the message has been successfully sent, the entry is removed from the queue and saved in the communication log.
⚠️ Beware of leaving an incorrectly configured webhook active for a long time, as the data will continue to accumulate in the database.
Trigger Events
An event must be selected as the trigger for the webhook. Currently the following events are defined as triggers.
Operator Login
An operator has logged into a terminal.
Operator Logout
An operator has logged out of a terminal.
Operation Started
An operation has started, this normally happens when a carrier enters work position on a station.
Operation Completed
An operation has completed. This normally happens when an operator pushes the operator switch.
Loading Finalized
This is an event unique to loading stations. This event happens when a loaded carrier leaves the working position.
This happens after Operation Completed, when the carrier has been routed and sent off. At this point the loading operator may no longer load something different on the carrier.
Operation Aborted
An operation has been cancelled. This can be due to using the 99 F4 command to trigger a recycling or sending the carrier to inspection or repair among other reasons.
Carrier Enter Work Position
This will happen slightly before the "Operation Completed" event, but the difference here is that this message is sent even if the carrier does not have an operation to do in the station.
Carrier Leave Work Position
The carrier has left the working position. This normally happens when the chain moves due to the operator pushing the switch, but may be triggered in some other circumstances as well.
Variables
The variable list is used both for evaluating rules as well as inserting data into messages.
You may navigate some of the variables to expose additional variables
Bundle Id
Show values available on the Bundle
Carrier Id
Show values available on the Carrier
Operation Id
Show values available on the Operation. This has the general information about the operation.
Operation Log Id
Show values available in the Operation Log. This is information about this particular instance of the operation.
Order Id
Show values available on the Order.
Order Line Id
Show values available on the Order Line.
Station Id
Show values available on the Station.
Webhook Rules
You can set up rules that will filter out events based on certain values. For example, maybe you only want the webhook to activate when an operation is completed on a certain station or on a certain article.
Comparers
= (Equals)
The selected variable is same as the given value.
≠ (Not Equals)
The selected variable is different from the given value.
< (Less Than)
The selected variable is less than the given value.
> (More Than)
The selected variable is more than the given value.
IN
The selected variable is one of the provided options
NOT IN
The selected variable is not one of the provided options.
Custom Payload
You can customize the message by enabling the "Custom Payload" option. This requires you to construct the entire message and inserting variables where needed. The variables will be formatted according to the selected formatter.
In this mode you are yourself responsible for constructing a valid message, such as matching brackets in a JSON structure or matching XML tags.
You can insert variable data into the message by selecting them from a list.
Formatters
Here is a comparison chart for different formatters
Original | JSON | XML | CSV |
---|---|---|---|
5 | 5 | 5 | 5 |
Simple | "Simple" | Simple | Simple |
John's bike | "John's bike" | John's bike | "John's bike" |
"Quotation" | "\"Quotation\"" | "Quotation" | """Quotation""" |
5 < 10 & 15 > 12 | "5 < 10 & 15 > 12" | 5 < 10 & 15 > 12 | "5 < 10 & 15 > 12" |
Line 1 Line 2 |
"Line 1\nLine 2" | Line 1 Line 2 |
"Line 1 Line 2" |