Webhooks integration
This document describes the various webhook types available for interaction with external systems. Webhooks are triggered by specific events in the queue system, and each webhook type corresponds to different actions or changes within the system.
Webhook Types
Each webhook type is contained in the type
field of the payload sent to the destination URL. The receiving endpoint must appropriately handle the incoming POST request payload.
Webhook Type | Description |
---|---|
positionCreated | Triggered when a walk-in or manual ticket is created. |
bookingConfirmation | Triggered when a customer creates a new booking. |
bookingActivated | Triggered when a booking is activated (i.e., the timeslot becomes active). |
bookingUpdated | Triggered when a booking is updated (e.g., rescheduled). |
positionRemoved | Triggered when staff reject a ticket. |
positionRetry | Triggered when staff call retry on a ticket. |
positionCalled | Triggered when staff call a position. |
positionFulfilled | Triggered when staff check in a position. |
positionCompleted | Triggered when staff check out a position. |
positionCancelled | Triggered when a customer cancels a position. |
positionCancelledByStaff | Triggered when staff cancel an upcoming booking. |
feedbackReceived | Triggered when a customer updates feedback on a ticket. |
Webhook Payload
Webhook payloads are sent in a POST request. The request supports headers configuration, which can be used for authentication purposes.
Field | Type | Description |
---|---|---|
message | string | Present for some webhook types; communicates a message to the customer associated with the event. |
data | object | Contains detailed information about the event. |
Data Fields
Field | Type | Description |
---|---|---|
position | object | Represents the current state of the ticket or booking (Position model). |
type | string | Type of the webhook, corresponding to the actions listed above. |
organization | string | Name of the organization to which the queue event corresponds. |
Position created webhook
{
"message": null,
"data": {
"position": {
"status": "pending",
"priority": 0,
"location": {
"locationName": "Ombori Stress Test 1",
"organizationTitle": "Ombori Title"
},
"label": "A2",
"locale": "en",
"registrationData": {
"phone": { value: "+48888888888" },
},
"notification": {
"type": "phoneNumber",
"settings": {
"from": "",
"to": "+460000",
"recipient": ""
}
},
"id": "4f288ab1-72c9-402a-95b3-296766336b68",
"type": "anonymous",
"queue": "b23bea4f-8e8a-4da6-b413-04454f8428aa",
"createdAt": "2021-01-21T14:05:17.527Z"
}
},
"type": "positionCreated",
"organization": "ombori"
}
Booking created webhook
{
"message": "Your booking for 2021-01-21 15:10 is now confirmed. Ticket: https://qr.run/Pt5vJ05h",
"data": {
"position": {
"location": {
"locationName": "Ombori Stress Test 1",
"organizationTitle": "Ombori Title"
},
"type": "booking",
"priority": 100,
"createdAt": "2021-01-21T14:07:21.598Z",
"locale": "en",
"registrationData": {
"phone": { value: "+48888888888" },
},
"notification": {
"type": "phoneNumber",
"settings": {
"from": "",
"to": "+460000",
"recipient": ""
}
},
"numberOfPeople": 1,
"booking": {
"start": "2021-01-21T14:10:00.000Z",
"end": "2021-01-21T14:15:00.000Z",
"virtualAppointment": {
"isEnabled": false
}
},
"status": "draft",
"label": "",
"id": "255c8a1d-b8b6-4fb4-b6d6-4a5416203e1b",
"queue": "b23bea4f-8e8a-4da6-b413-04454f8428aa",
"bookingReminderAt": null
}
},
"type": "bookingConfirmation",
"organization": "ombori"
}
Booking activated webhook
{
"message": "Your position: B1. Please come within 15 minutes to avoid cancellation of your appointment. Ticket: https://qr.run/1WPccolK",
"data": {
"position": {
"location": {
"locationName": "Ombori Stress Test 1",
"organizationTitle": "Ombori Title"
},
"type": "booking",
"priority": 100,
"createdAt": "2021-01-21T14:08:44.038Z",
"locale": "en",
"registrationData": {
"phone": { value: "+48888888888" },
},
"notification": {
"type": "phoneNumber",
"settings": {
"from": "",
"to": "",
"recipient": ""
}
},
"numberOfPeople": 1,
"booking": {
"start": "2021-01-21T14:10:00Z",
"end": "2021-01-21T14:15:00Z",
"virtualAppointment": {
"isEnabled": false
}
},
"status": "pending",
"label": "B1",
"id": "65e8eb52-7bba-4393-9a59-0b29c9251959",
"queue": "b23bea4f-8e8a-4da6-b413-04454f8428aa",
"bookingReminderAt": null,
"fulfilledAt": "2021-01-21T14:10:00.479Z",
"leaveReminderAt": null,
"leaveAt": null
}
},
"type": "bookingActivated",
"organization": "ombori"
}
Booking updated webhook
Position rejected by staff webhook
Position retry by staff webhook
Position called by staff webhook
Position checked-in by staff webhook
Position checked-out by staff
Position cancelled by customer webhook
Booking cancelled by staff webhook
Feedback received webhook