This page provides the list of events and associated payload for internal events (via RabbitMQ/AWS MQ) and external events (via EventBridge) for the Inventory microservice.
External Events via EventBridge
The following events contain the entity changed in the event message payload.
List of Events
S.No. | API call | Call detail | Event Type | Identifier |
---|---|---|---|---|
1. | POST | CreateBin | inventoryservice/bin/create | response_bin.name |
2. | DELETE | DeleteBin | inventoryservice/bin/delete | response_bin.name |
3. | Update | UpdateBin | inventoryservice/bin/update | response_bin.name |
5. | POST | CreateBinItem | inventoryservice/binitem/create | response_binItem.id |
6. | POST | CheckInventory | inventoryservice/inventory/check | response_binItems.binName |
7. | PATCH | PatchUpdateBinItem | inventoryservice/binitem/patch | response_binItem.id |
8. | POST | CreateTransaction | inventoryservice/transaction/create | response_transaction.id |
9. | POST | CreateBulkTransaction | inventoryservice/transactionbulk/create | response_bulkTransaction.binItems.binName |
10. | PATCH | PatchUpdateTransaction | inventoryservice/transaction/patch | response_transaction.id |
11. | POST | CreateInventoryRules | inventoryservices/inventoryrules/post | |
12. | PUT | UpdateInventoryRules | inventoryservices/inventoryrules/put | |
13. | PATCH | DeleteInventoryRules | inventoryservices/inventoryrules/delete |
Payload
CreateBin
Event Type: inventoryservice/bin/create
{
"version": "0",
"id": "f5cbf172-0fcd-de67-f4e6-2ee2e2d6ceae",
"detail-type": "inventoryservice/bin/create",
"source": "inventoryservice",
"account": "277827593990",
"time": "2024-05-09T06:29:15Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"id": "binexternalevents1715236155273",
"timestamp": 1715236155333,
"payload": {
"bin": {
"name": "binexternalevents1715236155273",
"description": "New Bin",
"status": 1,
"channel": "Mobile",
"type": "Primary",
"leafBin": false,
"properties": [
{
"name": "Brand",
"value": "Adidas"
}
],
"createdTime": 1715236155319,
"createdBy": "111",
"updatedTime": 1715236155319,
"updatedBy": "111"
}
},
"collectionId": "433",
"eventType": "inventoryservice/bin/create",
"userId": "111",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
UpdateBin
Event Type: inventoryservice/bin/update
{
"version": "0",
"id": "ca62db1c-f17c-632b-de62-866b28bdfec5",
"detail-type": "inventoryservice/bin/delete",
"source": "inventoryservice",
"account": "277827593990",
"time": "2024-05-09T06:29:47Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"timestamp": 1715236187045,
"payload": {
"responseCode": "INV_BIN_003",
"responseMessage": "BIN_DELETED",
"timeStamp": "1715236187043"
},
"collectionId": "433",
"eventType": "inventoryservice/bin/delete",
"userId": "111",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
CreateBinItem
Event Type: inventoryservice/binitem/create
{
"version": "0",
"id": "bd2f9c76-5981-5d6a-32e9-97b1b24f8a70",
"detail-type": "inventoryservice/binitem/create",
"source": "inventoryservice",
"account": "277827593990",
"time": "2024-05-09T06:29:25Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"id": "21323",
"timestamp": 1715236165905,
"payload": {
"binItem": {
"id": 21323,
"binName": "binexternalevents1715236155273",
"skuId": "SKUID_31682380800189488338",
"status": 1,
"atpQty": 0,
"preOrderedQty": 0,
"backOrderedQty": 20,
"lowStockThreshold": 5,
"outOfStockThreshold": 3,
"displayStatus": "BACKORDER",
"createdTime": 1715236165886,
"createdBy": "111",
"updatedTime": 1715236165886,
"updatedBy": "111",
"backOrderedQtyV2": 20.0,
"preOrderedQtyV2": 0.0,
"atpQtyV2": 0.0
}
},
"collectionId": "433",
"eventType": "inventoryservice/binitem/create",
"userId": "111",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
PatchUpdateBinItem
Event Type: inventoryservice/binitem/patch
{
"version": "0",
"id": "034bcc4a-37a1-07ab-3429-7337ad51255e",
"detail-type": "inventoryservice/binitem/patch",
"source": "inventoryservice",
"account": "277827593990",
"time": "2024-05-09T06:29:29Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"id": "21323",
"timestamp": 1715236169189,
"payload": {
"collectionId": 433,
"skuId": "SKUID_31682380800189488338",
"atpQty": 0,
"preOrderedQty": 0,
"backOrderedQty": 20,
"lowStockThreshold": 10,
"outOfStockThreshold": 3,
"displayStatus": "BACKORDER"
},
"collectionId": "433",
"eventType": "inventoryservice/binitem/patch",
"userId": "111",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
CreateTransaction
Event Type: inventoryservice/transaction/create
{
"version": "0",
"id": "cb0aee68-096b-a574-d350-cfed6bef428e",
"detail-type": "inventoryservice/transaction/create",
"source": "inventoryservice",
"account": "277827593990",
"time": "2024-05-09T06:29:32Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"id": "7884",
"timestamp": 1715236172420,
"payload": {
"transaction": {
"id": 7884,
"binItemId": 21323,
"type": 1,
"status": 1,
"atpQty": 100,
"preOrderedQty": 0,
"backOrderedQty": 20,
"consignmentCost": "2.5",
"notes": "Add Transaction",
"allowBackOrderFromATP": true,
"createdTime": 1715236172402,
"createdBy": "111",
"updatedTime": 1715236172402,
"updatedBy": "111",
"backOrderedQtyV2": 20.0,
"preOrderedQtyV2": 0.0,
"atpQtyV2": 100.0
}
},
"collectionId": "433",
"eventType": "inventoryservice/transaction/create",
"userId": "111",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
PatchUpdateTransaction
Event Type: inventoryservice/transaction/patch
{
"version": "0",
"id": "aa0b662a-2b87-6fd0-3a6d-252b61f0c051",
"detail-type": "inventoryservice/transaction/patch",
"source": "inventoryservice",
"account": "277827593990",
"time": "2024-05-09T06:29:35Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"id": "7884",
"timestamp": 1715236175676,
"payload": {
"transaction": {
"id": 7884,
"binItemId": 21323,
"type": 1,
"status": 0,
"atpQty": 100,
"preOrderedQty": 0,
"backOrderedQty": 20,
"consignmentCost": "3.5",
"properties": "Patch Transaction",
"notes": "Add Transaction\ Status Changed",
"allowBackOrderFromATP": true,
"createdTime": 1715236172000,
"createdBy": "111",
"updatedTime": 1715236172000,
"updatedBy": "111",
"backOrderedQtyV2": 20.0,
"preOrderedQtyV2": 0.0,
"atpQtyV2": 100.0
}
},
"collectionId": "433",
"eventType": "inventoryservice/transaction/patch",
"userId": "111",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
CreateBulkTransaction
Event Type: inventoryservice/transactionbulk/create
{
"version": "0",
"id": "95d03686-31b1-a6e0-879f-340d4ec9978c",
"detail-type": "inventoryservice/transactionbulk/create",
"source": "inventoryservice",
"account": "277827593990",
"time": "2024-05-09T06:29:38Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"timestamp": 1715236178909,
"payload": {
"bulkTransaction": {
"binItems": [
{
"binName": "binexternalevents1715236155273",
"skuId": "Active_Sku1",
"transaction": {
"type": 1,
"status": 1,
"atpQty": 500,
"backOrderedQty": 50,
"consignmentCost": "$10.0",
"notes": "Add Transaction",
"allowBackOrderFromATP": true,
"backOrderedQtyV2": 50.0,
"atpQtyV2": 500.0
},
"response": {
"responseCode": "INV_BTM_005",
"responseMessage": "BinItem not found"
}
}
],
"allOrNone": false
}
},
"collectionId": "433",
"eventType": "inventoryservice/transactionbulk/create",
"userId": "111",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
CheckInventory
Event Type: inventoryservice/inventory/check
{
"version": "0",
"id": "edb694f6-c46a-5a5e-5e49-7ae3b51bfe67",
"detail-type": "inventoryservice/inventory/check",
"source": "inventoryservice",
"account": "277827593990",
"time": "2024-05-09T06:29:42Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"timestamp": 1715236182160,
"payload": {
"binItems": [
{
"binName": "binexternalevents1715236155273",
"skuId": "SKUID_8171521280093103271",
"preOrderedQty": 0,
"atpQty": 5,
"response": {
"responseCode": "INV_BTM_005",
"responseMessage": "BinItem not found"
},
"properties": [
],
"preOrderedQtyV2": 0.0,
"atpQtyV2": 5.0
}
]
},
"collectionId": "433",
"eventType": "inventoryservice/inventory/check",
"userId": "111",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
DeleteBin
Event Type: inventoryservice/bin/delete
{
"version": "0",
"id": "ca62db1c-f17c-632b-de62-866b28bdfec5",
"detail-type": "inventoryservice/bin/delete",
"source": "inventoryservice",
"account": "277827593990",
"time": "2024-05-09T06:29:47Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"timestamp": 1715236187045,
"payload": {
"responseCode": "INV_BIN_003",
"responseMessage": "BIN_DELETED",
"timeStamp": "1715236187043"
},
"collectionId": "433",
"eventType": "inventoryservice/bin/delete",
"userId": "111",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
CreateInventoryRules
Event Type: inventoryservices/inventoryrules/post
{
"version": "0",
"id": "b3d07d11-cf0c-2141-f90e-5fbb1749ecbb",
"detail-type": "inventoryservices/inventoryrules/post",
"source": "inventoryservices",
"account": "277827593990",
"time": "2024-05-09T06:29:50Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"id": "93",
"timestamp": 1715236190275,
"payload": {
"collectionId": 433,
"id": 93,
"name": "TestRule__1715236190255",
"description": "Test Rule",
"status": "ACTIVE",
"ruleString": "string",
"processName": "string",
"createdBy": "111",
"updatedBy": "111",
"createdOn": 1715236190266,
"updatedOn": 1715236190266
},
"collectionId": "433",
"eventType": "inventoryservices/inventoryrules/post",
"userId": "111",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
UpdateInventoryRules
Event Type: inventoryservices/inventoryrules/put
{
"version": "0",
"id": "5f1f6f5a-adca-7305-40b3-f6958b9c2f11",
"detail-type": "inventoryservices/inventoryrules/put",
"source": "inventoryservices",
"account": "277827593990",
"time": "2024-05-09T06:29:53Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"id": "93",
"timestamp": 1715236193507,
"payload": {
"collectionId": 433,
"id": 93,
"name": "TestRule__1715236193485",
"description": "Test Rule",
"status": "ACTIVE",
"ruleString": "rNezdH",
"processName": "YPyyc",
"createdBy": "111",
"updatedBy": "111",
"createdOn": 1715236190000,
"updatedOn": 1715236193496
},
"collectionId": "433",
"eventType": "inventoryservices/inventoryrules/put",
"userId": "111",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
DeleteInventoryRules
Event Type: inventoryservices/inventoryrules/delete
{
"version": "0",
"id": "fab72f8f-a6b5-3112-1ba8-333e43fe359a",
"detail-type": "inventoryservices/inventoryrules/delete",
"source": "inventoryservices",
"account": "277827593990",
"time": "2024-05-09T06:29:56Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"id": "93",
"timestamp": 1715236196705,
"payload": {
"collectionId": 433,
"id": 93,
"name": "TestRule__1715236193485",
"description": "Test Rule",
"status": "DELETED",
"ruleString": "rNezdH",
"processName": "YPyyc",
"createdBy": "111",
"updatedBy": "111",
"createdOn": 1715236190000,
"updatedOn": 1715236196695
},
"collectionId": "433",
"eventType": "inventoryservices/inventoryrules/delete",
"userId": "111",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
Internal Events via RabbitMQ/AWS MQ
The following events communicate with the internal microservices.
List of Events
Below is the list of events of the Inventory microservice:
SL.# | Name | Description | Publish Location | Routing Key | Durability | Payload Type |
---|---|---|---|---|---|---|
1 | Bin Created | This event will be generated when a new bin is created. | Topic: ecomm | inventory.bin.created | false | InventoryBinPayload |
2 | Bin Updated | This event will be generated when a bin is updated. | Topic: ecomm | inventory.bin.updated | false | InventoryBinPayload |
3 | Bin Deleted | This event will be generated when a bin is deleted. | Topic: ecomm | inventory.bin.deleted | false | InventoryBinPayload |
4 | BinItem Created | This event will be generated when a new bin item is created. | Topic: ecomm | inventory.binitem.created | false | InventoryBinItemPayload |
5 | BinItem Updated | This event will be generated when a bin item is updated. | Topic: ecomm | inventory.binitem.updated | false | InventoryBinItemPayload |
6 | Transaction Created | This event will be generated when a new transaction is created. | Topic: ecomm | inventory.transaction.created | false | InventoryTransactionPayload |
7 | Transaction Updated | This event will be generated when a transaction is updated. | Topic: ecomm | inventory.transaction.updated | false | InventoryTransactionPayload |
8 | Bulk Transaction Listener | This queue listener looks for events with inventory transaction requests in bulk, processes them, and posts the response into the replyto queue. | Queue: inventory.bulktransactions | n/a | true | BulkTransactionPayload |
Payload Models
Below is the list of payloads for the Inventory microservice events:
InventoryBinPayload
PROPERTY | TYPE | DESCRIPTION | EXAMPLE |
---|---|---|---|
eventName | string | Indicates the generated event name. | BIN_CREATED |
bin.binName | string | Indicates the name of the bin on which the event is generated. | newbin1 |
InventoryBinItemPayload
PROPERTY | TYPE | DESCRIPTION | EXAMPLE |
---|---|---|---|
eventName | string | Indicates the generated event name. | BINITEM_CREATED |
binItem.binName | string | Indicates the name of the bin on which the event is generated. | newbin1 |
binItem.binItemId | long | Indicates the unique ID of the bin item. | 123 |
binItem.skuId | string | Indicates the unique ID of a SKU in the bin. | SKU1 |
binItem.displayStatus | string | Defines availability status of the bin item. | IN STOCK |
InventoryTransactionPayload
PROPERTY | TYPE | DESCRIPTION | EXAMPLE |
---|---|---|---|
eventName | string | Indicates the generated event name. | TRANSACTION_CREATED |
transaction.transactionId | long | Indicates the unique ID of the transaction. | 123 |
transaction.binItemId | long | Indicates the unique ID of the bin item on which this transaction is done. | 123 |
transaction.transactionType | integer | Indicates the type of the transaction. The possible types are: 0 – NONE, 1 – ADD, 2 – REMOVE, 3 – TRANSFER, or 4 – RECONCILE. | 1 |
BulkTransactionPayload
PROPERTY | TYPE | DESCRIPTION | EXAMPLE |
---|---|---|---|
allOrNone | boolean | Indicates whether the operation to be committed (only if all transactions are successful) or not. | true |
binItems[].binName | string | Indicates the bin name on which the transaction to be executed. | atpbin1 |
binItems[].skuId | string | Indicates the SKU ID of the bin item on which the transaction to be executed. | sku1 |
binItems[].transaction.id | long | Indicates the READONLY field that returns the ID of the executed transaction. | 121 |
binItems[].transaction.binItemId | long | Indicates READONLY field that returns the bin item ID on which the transaction is executed. | 232 |
binItems[].transaction.type | integer | Indicates the type of the transaction. The possible transaction types are: 1 – ADD, 2 – REMOVE, 3 – TRANSFER, 4 – or RECONCILE. | 1 |
binItems[].transaction.status | integer | Indicates the status of the transaction. The transaction statuses are: 1 – Active or 0 – Inactive. | 1 |
binItems[].transaction.fromBinName | string | Indicates the name of the source bin, which is used for transferring of ATP or backorder quantities from one bin item to another bin item. Null for other transaction types. | bin1 |
binItems[].transaction.toBinName | string | Indicates the name of the target bin, which is used for transferring of ATP or backorder quantities from the source bin. Null for other transaction types | bin2 |
binItems[].transaction.referenceId | string | Indicates the reference transaction ID of the TRANSFER type transaction. | abc123 |
binItems[].transaction.atpQty | integer | Indicates the quantity of the item to be added, removed, or transferred in atpQty. | 12 |
binItems[].transaction.backOrderedQty | integer | Indicates the quantity of the item to be added, removed, or transferred in backOrderedQty. | 12 |
binItems[].transaction.properties | string | Indicates the custom properties of the current transaction. | {“orderid” : “123”} |
binItems[].transaction.notes | string | Specifies the information about the transaction. | inventory blocked for order creation |
Revision History
2024-05-22 | AN – Added external events for 8.17.4 release.
2019-05-13 | AN – List of events table updated.
2019-05-06 | PLK – Minor copyedit.
2019-04-11 | MA – Content updated for April 2019 release.
2019-01-23 | PLK – Content uploaded.