Tracking

How the Budbee Skrym events are structured

Last updated 12 Sept 2024

In the below diagram, we illustrate how the integration between Skrym and Budbee works for fetching the shipment events. You can read more about their various events in the developer.budbee.com faviconBudbee API Docs.

Tracking Events Flow
sequenceDiagram autonumber participant MsgConsumer as Consumer create participant Retailer as Retailer MsgConsumer ->>+Retailer: Places order Note over Retailer: Picking & Packing create participant Skrym as Skrym Retailer ->>Skrym: Initialize tracking create participant Budbee as Budbee Retailer ->>+Budbee: Create order Budbee ->>Retailer: Pickup Note over Budbee: Retailer must add Skrym as<br/> subscriber to Budbee events Budbee->>+Skrym: Event Webhook Note over Skrym: Analyze/translate event Skrym->>Retailer: Event Webhook Retailer-->>MsgConsumer: Notification (e-mail/SMS) Budbee->>-MsgConsumer: Delivery
This illustrates how Skrym receives events from Budbee. Note that the retailer needs to configure access for Skrym in the Budbee portal.

Budbee event structure

Budbee uses a structure for their events. The basis of the structure that every event contains. The header contains some identifying information:

Headers


Authorization: basic auth or OAuth2
Budbee-Event: Name of event to trigger webhook
Budbee-Event-ID: ID of the event (Corresponds to the `key` in the `event` table)
Content-Type: application/json
Timestamp: time of event trigger

Body


{
"event": "GENERIC_EVENT",
"eventData": {
"tmsId": "ABCD",
"cartId": "1234",
"budbeeOrderToken": "a75dd44k",
"shipmentId": "0000A5464644",
"packageId": "3573847654593475837465345"
}
}

Budbee also adds some additional information for some of the events, such an example can be the CHANGED_TO_LOCKER_DELIVERY that contains the lockers locations and name as well as the reason and responsible party for creating the event.

Info

The Webhooks we receive are on a parcel-by-parcel level, meaning that we register one event for each parcel. This means that every Budbee event that we store, has a parcelD stored as a trackingReference instead of a shipmentID


{
"event": "CHANGED_TO_LOCKER_DELIVERY",
"eventData": {
"tmsId": "ABCD",
"cartId": "1234",
"budbeeOrderToken": "a75dd44k",
"shipmentId": "0000A5464644",
"packageId": "3573847654593475837465345",
"reason": "Not home during expected delivery",
"responsible": "CONSUMER",
"street": "longstreet 321",
"postalCode": "123 45",
"city": "capital of nowhere",
"lockerName": "The convenient locker"
}
}