Events
One set of events drives three things: the toasts in the console, the realtime stream, and outbound webhooks.
The envelope
Section titled “The envelope”| Field | |
|---|---|
type | The event type, listed below |
message | A short human-readable line, shown in the toast |
sticky | Whether the toast stays until dismissed |
data | Structured payload: ids, loan number, person name |
at | ISO timestamp |
Submissions
Section titled “Submissions”| Type | Fires when |
|---|---|
submission.created | A repair is lodged. Sticky when lodged by a client |
submission.status | Its status changes |
submission.vendor | It is sent to, or updated by, an external repair vendor |
Tickets
Section titled “Tickets”| Type | Fires when |
|---|---|
ticket.created | A ticket is raised |
ticket.status | Its status changes |
ticket.comment | A public reply is added. Internal notes do not fire |
ticket.merged | Two tickets are merged |
| Type | Fires when |
|---|---|
loan.assigned | A loan is issued |
loan.returned | A loan comes back |
loan.registered | A device is added to a pool |
loan.removed | A device is removed |
loan.bulk | A bulk action runs |
loan.synced | A pool syncs from an MDM smart group |
Service quality
Section titled “Service quality”| Type | Fires when |
|---|---|
sla.breach | A response or resolution target is missed. One shot per item |
automation.match | An automation rule matched a new submission |
Monitors
Section titled “Monitors”| Type | Fires when |
|---|---|
monitor.up | A monitored service recovers |
monitor.down | It goes down |
monitor.alert | An alert threshold is reached |
Backups
Section titled “Backups”| Type | Fires when |
|---|---|
backup.success | A backup completes |
backup.failed | One does not |
Kiosk and security
Section titled “Kiosk and security”| Type | Fires when |
|---|---|
kiosk.request | An assistance request is raised at the kiosk |
kiosk.resolved | It is approved or denied |
security.resolved | A security approval request is decided |
Where to receive them
Section titled “Where to receive them”In the console. Automatic. This is what makes the desk update itself.
In your own system. Register an outbound webhook. Signed with HMAC-SHA256, and you can filter to specific types.
In a browser client of your own. Subscribe to /api/events with
EventSource, inside an authenticated session.
Notes worth knowing
Section titled “Notes worth knowing”ticket.comment only fires on public replies. Internal notes never generate
an event, and never send an email. That is the same rule everywhere: an internal
note is for the desk.
sla.breach fires once per item. A breach that stays breached does not
generate a new event every minute, because people mute an alert that repeats.
submission.created is sticky when the source is a client. A booking made at
the kiosk while nobody was looking at the screen is still there when somebody is.
Order is not guaranteed. Two events fired close together can arrive in either order at a webhook receiver. Build for that.
Tenant scoping
Section titled “Tenant scoping”Events are filtered by tenant before delivery. A subscriber receives only their own tenant’s events, and a webhook endpoint only receives its own tenant’s.