ProductName
Integration

Description

Every time specific events occur within Thetis IMS an event object is put on the systems event bus.

The Thetis IMS event bus resides within our AWS account. It is possible to have events related to your subscription passed onto an event bus within your AWS account. In this way you may handle the events using your own programs.

If you don’t have an AWS account, we will be happy to create one for you.

If you would rather handle the events on your own infrastructure, we offer a free application that passes the events from your AWS account to an URL of your choice using HTTPS.

If you would like to handle the events client side, we offer a free application that pushes the events from your AWS account onto a web-socket connection.

Event types

Availability changed

Description

This event is fired when the available stock in hand of a trade item changes. The available stock in hand is equal to the physical stock in hand minus the quantity reserved for orders.

The availability of a trade item changes whenever:

  • A new reservation is made. Reservations are typically made automatically along with shipment lines.
  • A reservation is changed.
  • A physical change of stock is made that is not done in accordance with a previously made reservation.

The event object does not contain information about the reservation that caused the change in availability. If you need this kind of information, the ‘Available stock changed’ event is more suitable.

Conveniently this event contains the available stock in hand of the trade item after the event. Hence, you might be able to update the quantity for sales in your other systems without requesting further data from Thetis IMS.

Example event object

{
    "version": "0",
    "id": "3ad9dbe5-f9d1-e07f-ed0c-0fec6d106b58",
    "detail-type": "availabilityChanged",
    "source": "public.thetis-ims.com",
    "account": "170069103691",
    "time": "2020-04-28T07:29:06Z",
    "region": "eu-west-1",
    "resources": [],
    "detail": {
        "globalTradeItemId": 17557015,
        "subscriberId": "379",
        "eventId": "0a10fe47-6c0c-4f3b-9886-64d377aa591f",
        "numItemsAvailable": 1356,
        "contextId": "550",
        "eventType": "availabilityChanged"
    }
}

Physical stock changed

Description

This event is fired when the physical stock in hand changes.

The event object contains the type of the transaction that caused the change in physical stock. The different types of transactions are described here.

Example event object

{
    "version": "0",
    "id": "0a5c8a0e-4046-931d-8e7c-3c2c4a1d732f",
    "detail-type": "physicalStockChanged",
    "source": "public.thetis-ims.com",
    "account": "170069103691",
    "time": "2020-04-27T04:24:30Z",
    "region": "eu-west-1",
    "resources": [],
    "detail": {
        "globalTradeItemId": 32282966,
        "transactionType": "SHIPPING",
        "subscriberId": "379",
        "eventId": "3a11c7b9-8de4-4123-b64a-960cf9e5af41",
        "sellerId": 23080690,
        "reservationId": 33413287,
        "delta": -1,
        "contextId": "550",
        "eventType": "physicalStockChanged",
        "userId": 4348466,
        "transactionId": 13435665
    }
}

Available stock changed

Description

This event is fired when the available stock in hand changes.

The event object does not contain any information about the trade item post the event. Especially, it does not contain the total available stock in hand of the trade item after the event. If you need this information, the ‘Availability changed event’ is more suitable.

Example event object

{
    "version": "0",
    "id": "f5a03a0e-6442-994b-1232-8cb27cde0df9",
    "detail-type": "availableStockChanged",
    "source": "public.thetis-ims.com",
    "account": "170069103691",
    "time": "2020-04-27T07:10:19Z",
    "region": "eu-west-1",
    "resources": [],
    "detail": {
        "globalTradeItemId": 23554123,
        "subscriberId": "379",
        "eventId": "ac48662e-f706-4b3d-9266-1c2ae7c58694",
        "reservationId": 33536678,
        "delta": -1,
        "contextId": "550",
        "eventType": "availableStockChanged",
        "userId": 26566639
    }
}

Document created

Description

This event is fired when a new document is created.

The event object contains the type of the document that was created. The different types of documents are described here.

Example event objects

Delivery note

{
    "version": "0",
    "id": "9a0d5895-6d9b-257e-2c90-01dbe0f38a51",
    "detail-type": "documentCreated",
    "source": "public.thetis-ims.com",
    "account": "170069103691",
    "time": "2020-12-03T20:38:24Z",
    "region": "eu-west-1",
    "resources": [],
    "detail": {
        "eventId": "084d99b3-7e32-4f80-bac0-32a5cf85cf20",
        "documentType": "DELIVERY_NOTE",
        "shipmentId": 61719264,
        "subscriberId": "379",
        "contextId": "550",
        "documentId": 61726387,
        "eventType": "documentCreated",
        "userId": 19384215,
        "shipmentNumber": "DK157367",
        "deviceName": "WS01"
    }
}

Goods receipt

{
    "version": "0",
    "id": "fee1b9ce-deb0-b72a-ccb3-0b81e665684d",
    "detail-type": "documentCreated",
    "source": "public.thetis-ims.com",
    "account": "170069103691",
    "time": "2020-12-03T12:43:13Z",
    "region": "eu-west-1",
    "resources": [],
    "detail": {
        "eventId": "010dd9c7-31e4-4538-8c54-d7dfd02aeeed",
        "documentType": "GOODS_RECEIPT",
        "inboundShipmentNumber": "12",
        "subscriberId": "379",
        "contextId": "550",
        "documentId": 61679367,
        "inboundShipmentId": 61678807,
        "eventType": "documentCreated",
        "userId": 24202995,
        "deviceName": "WS01"
    }
}

Adjustment list

    "version": "0",
    "id": "1fc69e29-8658-bb4f-1469-891c767b3d38",
    "detail-type": "documentCreated",
    "source": "public.thetis-ims.com",
    "account": "170069103691",
    "time": "2020-12-01T15:12:45Z",
    "region": "eu-west-1",
    "resources": [],
    "detail": {
        "eventId": "ccb4a741-2935-4687-9c4c-7856bd56b828",
        "stockTakingId": 60369254,
        "documentType": "ADJUSTMENT_LIST",
        "subscriberId": "379",
        "contextId": "550",
        "documentId": 61484285,
        "eventType": "documentCreated",
        "userId": 19384215,
        "deviceName": "WS01"
    }
}

Return receipt

{
    "version": "0",
    "id": "790f05e1-7987-a0b7-1d0b-c39f58fd5dfe",
    "detail-type": "documentCreated",
    "source": "public.thetis-ims.com",
    "account": "170069103691",
    "time": "2020-12-03T07:37:17Z",
    "region": "eu-west-1",
    "resources": [],
    "detail": {
        "eventId": "5921c37b-89e7-4aa0-bfce-3ba93c932bf3",
        "documentType": "RETURN_RECEIPT",
        "subscriberId": "379",
        "returnShipmentId": 61635351,
        "contextId": "550",
        "documentId": 61637197,
        "returnShipmentNumber": "89",
        "eventType": "documentCreated",
        "userId": 44360201,
        "deviceName": "WS01"
    }
}

Document cancelled

Description

This event is fired when a document is cancelled.

Example event object

{
    "version": "0",
    "id": "a5e7b7ca-a681-1d24-1ba6-0b312210b7f9",
    "detail-type": "documentCancelled",
    "source": "public.thetis-ims.com",
    "account": "170069103691",
    "time": "2020-04-28T09:32:08Z",
    "region": "eu-west-1",
    "resources": [],
    "detail": {
        "subscriberId": "379"
        "eventId": "7fc84d83-44a1-45c8-b723-5972cd52671b",
        "documentType": "DELIVERY_NOTE",
        "contextId": "550",
        "documentId": 33011562,
        "eventType": "documentCancelled",
        "userId": 32935249,
        "deviceName": "WS01"
    }
}

Packing completed

Description

This event is fired when a user completes the packing of a shipment.

Consignment systems should listen for this event.

Example event object

{
    "version": "0",
    "id": "294cf01f-9f86-9e93-1ab4-616f0f04ce96",
    "detail-type": "packingCompleted",
    "source": "public.thetis-ims.com",
    "account": "170069103691",
    "time": "2020-04-28T07:27:24Z",
    "region": "eu-west-1",
    "resources": [],
    "detail": {
        "subscriberId": "379",
        "eventId": "55da5afa-86c1-4153-b11d-c369f53ddbac",
        "carrierName": "GLS",
        "shipmentId": 33527208,
        "contextId": "550",
        "eventType": "packingCompleted",
        "carrierId": 28256060,
        "userId": 3186879,
        "deviceName": "WS01"
    }
}

File attached

Description

This event is fired when a file is attached to an instance of an entity.

The event contains a pre-signed URL that you can use to access the file. The URL is only valid for 5 minutes.

Example event object

{
    "version": "0",
    "id": "883e2f3f-3ece-3ecf-6497-c3c9ff00a8d4",
    "detail-type": "fileAttached",
    "source": "public.thetis-ims.com",
    "account": "170069103691",
    "time": "2020-05-18T12:08:46Z",
    "region": "eu-west-1",
    "resources": [],
    "detail": {
        "subscriberId": "379",
        "eventId": "a9499b38-6c09-4543-9230-7e1f972d81da",
        "entityName": "InboundShipment",
        "contextId": "550",
        "entityId": 34756825,
        "userId": 7425798,
        "url": "https://thetis-ims-attachments.s3-eu-west-1.amazonaws.com/InboundShipment/34756825/Villy%20faktura%20590976%2015.05.2020.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20200518T120846Z&X-Amz-SignedHeaders=host&X-Amz-Expires=300&X-Amz-Credential=AKIAIWNCZV6LIZYW27RQ%2F20200518%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Signature=c00fe138e213f8b4189169a86c7d86a548b02e4a4e2aa3bb65c9d870f6ede8d0",
        "deviceName": "WS01"
    }
}

Shipment created

Description

This event is fired whenever a new shipment is created.

Example event object

{
    "version": "0",
    "id": "341fa24f-7ded-368a-2676-ce083af86d5f",
    "detail-type": "shipmentCreated",
    "source": "public.thetis-ims.com",
    "account": "170069103691",
    "time": "2020-10-06T09:28:43Z",
    "region": "eu-west-1",
    "resources": [],
    "detail": {
        "eventId": "a7f36f8b-7486-4c64-a717-1fadbe55d925",
        "sellerId": 17654475,
        "shipmentId": 53366833,
        "subscriberId": "379",
        "contextId": "550",
        "eventType": "shipmentCreated",
        "userId": 17555066,
        "shipmentNumber": "NGGL10776",
        "deviceName": "WS01"
    }
}

Inbound shipment created

Description

This event is fired whenever a new inbound shipment is created.

Example event object

{
    "version": "0",
    "id": "7a1a7231-f1c0-5e36-38c6-8bbe77b38000",
    "detail-type": "inboundShipmentCreated",
    "source": "public.thetis-ims.com",
    "account": "170069103691",
    "time": "2020-10-05T09:26:49Z",
    "region": "eu-west-1",
    "resources": [],
    "detail": {
        "eventId": "ce3d0986-925f-4479-84bc-82e90f9fd803",
        "inboundShipmentNumber": "58",
        "subscriberId": "379",
        "contextId": "550",
        "inboundShipmentId": 53159120,
        "eventType": "inboundShipmentCreated",
        "userId": 30729041,
        "deviceName": "WS01"
    }
}

Return shipment created

Description

This event is fired whenever a new return shipment is created.

Example event object

{
    "version": "0",
    "id": "355cb99c-a2da-0f37-9943-f29d8ae6d403",
    "detail-type": "returnShipmentCreated",
    "source": "public.thetis-ims.com",
    "account": "170069103691",
    "time": "2020-10-06T09:14:31Z",
    "region": "eu-west-1",
    "resources": [],
    "detail": {
        "eventId": "126a4f4a-2de3-475b-a14e-d6eb4be1e0a2",
        "subscriberId": "379",
        "returnShipmentId": 53364346,
        "contextId": "550",
        "returnShipmentNumber": "3",
        "eventType": "returnShipmentCreated",
        "userId": 32935249,
        "deviceName": "WS01"
    }
}

Trade item created

Description

This event is fired whenever a new trade item is created.

Example event object

{
    "version": "0",
    "id": "1d87496a-a007-9dc7-167f-407fc9a7ce69",
    "detail-type": "itemCreated",
    "source": "public.thetis-ims.com",
    "account": "170069103691",
    "time": "2020-10-06T02:22:40Z",
    "region": "eu-west-1",
    "resources": [],
    "detail": {
        "globalTradeItemId": 53304397,
        "eventId": "b50d9476-ec2a-4118-ad6e-bce760c03d6b",
        "stockKeepingUnit": "202032003-999-OS",
        "subscriberId": "379",
        "contextId": "550",
        "eventType": "itemCreated",
        "userId": 27873939,
        "deviceName": "WS01"
    }
}

Custom event

tbd

tbd

Description

This event is fired when a file is ready for print.

The event object contains a URL pointing to the file. The URL is pre-signed. It is valid for 60 minutes only.

Example event object

{
    "version": "0",
    "id": "dee97dbd-e05d-accd-52bb-0f86110286e6",
    "detail-type": "printReady",
    "source": "public.thetis-ims.com",
    "account": "170069103691",
    "time": "2020-10-26T08:28:34Z",
    "region": "eu-west-1",
    "resources": [],
    "detail": {
        "deviceType": "MOBILE",
        "eventId": "634dd6fc-e7ca-473f-a094-4597c19ff8fa",
        "subscriberId": "170",
        "contextId": "319",
        "eventType": "printReady",
        "userId": 12187078,
        "deviceName": "-",
        "url": "https://s3.eu-west-1.amazonaws.com/thetis-ims-print/DELIVERY_NOTE_55187447.pdf?X-Amz-Security-Token=IQoJb3JpZ2luX2VjEJ%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCWV1LXdlc3QtMSJIMEYCIQDXgy8DFeOL4ZUUvQE1GuHsbDAxcVT5JWavsVUCmnKMqQIhAKQQHT7H1HW3EF64orzfJB8e47HrDKnvfD8YttFG8VwWKtcBCOj%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEQAhoMMTcwMDY5MTAzNjkxIgy7ReMcCFvP1rC%2FhcgqqwFKGSh4%2FENq0euRp5ff5%2FXsc3ytOIYCTAo9JRmeGtz%2FlzN7NK9dPb9yBGbdEZJpyPsa8l4ll0hlmE4SjKn6gYQQ%2BvI0DEDkgC8TwGZIbWi5iMAkz0h2eQhseq7LhhGD%2FSz5Gw7vmIMxor2T8jpdaDNBTGxHW8sn7OrSTIOkJMWA7tZf4HSguIzwnzXlq%2Bw4J%2BxcOobkYzjCJoUPtGpkpJ%2Fbzdj9oZlni%2FObJUYwqOPZ%2FAU63wHMK4NXbeGqeeZD682PLWeT1NAghbgTXBTYrITkNWiByiaVeBXsqLvU%2Fs2ZDPmjO%2FX2IxqwAlONVwZYdZfNwyT4uzkdh4%2F9U2%2FumjbJy2kRAWIY7W3eK6Ei7J67M%2FZDQDpLP%2BGqzGIyeCQbcnPViewLV7XcKm4X%2BTxUWGdRIvGM4Ks%2FrSup3s3lBA9bsd867AKUgQxKG%2B7TW%2Ff%2FanAkDwR4JwgaO36PZwMFo5h2VX7E%2B86LSGaWEnsjtLPVf0K87aKY%2FW8F8c9wuObvMV2a91hi2cHgbsauCrCrHF3N%2BAQq&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20201026T082834Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3599&X-Amz-Credential=ASIASPGHISRF2DFXMTVN%2F20201026%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Signature=f9323e1013e38e875d82ddab5347fa275552b34f3ed8e0db5b10250c61fd5251",
        "deviceName": "WS01"
    }
}