Skip to main content

Multiple transactions

Multiple transactions

Stock transaction service is transactional, so transactions are immutable, and a single transaction updates a single stock type. Some operations can result in several transactions.

Example of a stock transfer from one business unit to another:

  • A single operation for a stock transfer from business unit A to business unit B creates three transactions:
    • Decrease "sales stock" quantity for business unit A (no longer available for sales)
    • Increase "in transit" quantity for business unit A
    • Increase "in order" quantity for business unit B (indicates incoming items for receiving business unit)
  • When the receiving business unit receives the items, and performs an operation of type stock transfer received, another three transactions are created:
    • Decrease "in transit" quantity for business unit A (no more items being transferred)
    • Decrease "in order" quantity for business unit B (no more incoming items)
    • Increase "sales stock" quantity for business unit B (items made available for sales)

Return