Transaction and data flow in LS One POS

It is important to understand both the flow of the transaction between the core and external modules and the data within the transaction.

Data flow

All settings regarding terminal, store, hardware-, visual- and functionality profiles are read at startup. After each transaction has been concluded, information regarding the terminal and store are reloaded. Other information such as price, tax, discounts, infocodes and so on are, on the other hand, read at run-time.

The current transaction information is not saved into the transaction table until after payment but the current state of the transaction is serialized (using XML) into the database while it is being worked on in the LS One POS. As soon as it has been saved into the transaction tables, the serialized version of the transaction is discarded.

Transaction flow

This is the logical flow of the transaction:

  1. A user input creates the transaction by selling the first item, for example.
  2. The POS application will then call the appropriate operations, services and triggers within external modules. These operations update the transaction object state.
    For an example the Price service fetches price for items and the Discount service adds discount to the transaction.
  3. The POS application finally writes the transaction to the database

There are multiple types of transactions for an example:

  • End of day transaction
  • Log on / Log off transaction
  • Sales transactions

Transaction object

The transaction object contains all information about the current operations. All the services have access to the transaction objects which means you can always work with the current transaction state and make changes to it.

The transaction object is saved to the database after every change which enables us to restore the transaction if the POS goes down during the transaction before it is finalized.

See a more detail image of the retail transaction object.