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 callCall detailEvent TypeIdentifier
1.POSTCreateBininventoryservice/bin/createresponse_bin.name
2.DELETEDeleteBininventoryservice/bin/deleteresponse_bin.name
3.UpdateUpdateBininventoryservice/bin/updateresponse_bin.name
5.POSTCreateBinIteminventoryservice/binitem/createresponse_binItem.id
6.POSTCheckInventoryinventoryservice/inventory/checkresponse_binItems.binName
7.PATCHPatchUpdateBinIteminventoryservice/binitem/patchresponse_binItem.id
8.POSTCreateTransactioninventoryservice/transaction/createresponse_transaction.id
9.POSTCreateBulkTransactioninventoryservice/transactionbulk/createresponse_bulkTransaction.binItems.binName
10.PATCHPatchUpdateTransactioninventoryservice/transaction/patchresponse_transaction.id
11.POSTCreateInventoryRulesinventoryservices/inventoryrules/post
12.PUTUpdateInventoryRulesinventoryservices/inventoryrules/put
13.PATCHDeleteInventoryRulesinventoryservices/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.#NameDescriptionPublish LocationRouting KeyDurabilityPayload Type
1Bin CreatedThis event will be generated when a new bin is created.Topic: ecomminventory.bin.createdfalseInventoryBinPayload
2Bin UpdatedThis event will be generated when a bin is updated.Topic: ecomminventory.bin.updatedfalseInventoryBinPayload
3Bin DeletedThis event will be generated when a bin is deleted.Topic: ecomminventory.bin.deletedfalseInventoryBinPayload
4BinItem CreatedThis event will be generated when a new bin item is created.Topic: ecomminventory.binitem.createdfalseInventoryBinItemPayload
5BinItem UpdatedThis event will be generated when a bin item is updated.Topic: ecomminventory.binitem.updatedfalseInventoryBinItemPayload
6Transaction CreatedThis event will be generated when a new transaction is created.Topic: ecomminventory.transaction.createdfalseInventoryTransactionPayload
7Transaction UpdatedThis event will be generated when a transaction is updated.Topic: ecomminventory.transaction.updatedfalseInventoryTransactionPayload
8Bulk Transaction ListenerThis queue listener looks for events with inventory transaction requests in bulk, processes them, and posts the response into the replyto queue.Queue: inventory.bulktransactionsn/atrueBulkTransactionPayload

Payload Models

Below is the list of payloads for the Inventory microservice events:

InventoryBinPayload

 
PROPERTYTYPEDESCRIPTIONEXAMPLE
eventNamestringIndicates the generated event name.BIN_CREATED
bin.binNamestringIndicates the name of the bin on which the event is generated.newbin1

InventoryBinItemPayload

 
PROPERTYTYPEDESCRIPTIONEXAMPLE
eventNamestringIndicates the generated event name.BINITEM_CREATED
binItem.binNamestringIndicates the name of the bin on which the event is generated.newbin1
binItem.binItemIdlongIndicates the unique ID of the bin item.123
binItem.skuIdstringIndicates the unique ID of a SKU in the bin.SKU1
binItem.displayStatusstringDefines availability status of the bin item.IN STOCK

InventoryTransactionPayload

 
PROPERTYTYPEDESCRIPTIONEXAMPLE
eventNamestringIndicates the generated event name.TRANSACTION_CREATED
transaction.transactionIdlongIndicates the unique ID of the transaction.123
transaction.binItemIdlongIndicates the unique ID of the bin item on which this transaction is done.123
transaction.transactionTypeintegerIndicates the type of the transaction. The possible types are: 0 – NONE, 1 – ADD, 2 – REMOVE, 3 – TRANSFER, or 4 – RECONCILE.1

BulkTransactionPayload

 
PROPERTYTYPEDESCRIPTIONEXAMPLE
allOrNonebooleanIndicates whether the operation to be committed (only if all transactions are successful) or not.true
binItems[].binNamestringIndicates the bin name on which the transaction to be executed.atpbin1
binItems[].skuIdstringIndicates the SKU ID of the bin item on which the transaction to be executed.sku1
binItems[].transaction.idlongIndicates the READONLY field that returns the ID of the executed transaction.121
binItems[].transaction.binItemIdlongIndicates READONLY field that returns the bin item ID on which the transaction is executed.232
binItems[].transaction.typeintegerIndicates the type of the transaction. The possible transaction types are: 1 – ADD, 2 – REMOVE, 3 – TRANSFER, 4 – or RECONCILE.1
binItems[].transaction.statusintegerIndicates the status of the transaction. The transaction statuses are: 1 – Active or 0 – Inactive.1
binItems[].transaction.fromBinNamestringIndicates 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.toBinNamestringIndicates the name of the target bin, which is used for transferring of ATP or backorder quantities from the source bin. Null for other transaction typesbin2
binItems[].transaction.referenceIdstringIndicates the reference transaction ID of the TRANSFER type transaction.abc123
binItems[].transaction.atpQtyintegerIndicates the quantity of the item to be added, removed, or transferred in atpQty.12
binItems[].transaction.backOrderedQtyintegerIndicates the quantity of the item to be added, removed, or transferred in backOrderedQty.12
binItems[].transaction.propertiesstringIndicates the custom properties of the current transaction.{“orderid” : “123”}
binItems[].transaction.notesstringSpecifies 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.