Lesson 9 - LS One POS architecture

It is important to understand both the architecture of the LS One POS application and flow of the transaction between the core and external modules and the data within the transaction. In this lesson you will familiarize yourself with the structure to understand how to build your customizations.

Architecture

The LS One POS is a powerful system structure based on a layered, service oriented architecture, including an isolated system core. All localized business logic and special adaptations are contained in exchangeable modules.

The main structure of the LS One POS includes the application itself, services and triggers. As displayed in the image both the POS application and the exchangeable modules have access to the same settings: security, logging and exception handling. All services and components of the LS One suite use the same datalayer so once it has been changed in one place the same properties and/or changes are available in both the LS One POS and Site Manager for example.

In the the following topics, each service is described and explained as well as the function and purpose of the Triggers

 

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.

Data loading

The POS loads settings at startup such as

  • Profiles
  • Terminal data
  • Database connection

Other settings loaded during login:

  • Button layout
  • Language

Some settings are cached in memory and are not reloaded until the POS is restarted other data is refreshed after each transaction. Read more about the cache.

POS Customizations

There are quite a few external modules that can be customized. These fall into the following categories:

  • Services - Changing or extending the default functionality
  • Blank operations - Implementing custom operations
  • Triggers - Adding to the default functionality
  • Peripherals - All communications with hardware
  • UI Controls - Keyboards
  • Database Utility - Changing or extending the default functionality

We are going to explore the basics of these external modules and take a look at some of them.

The LS One POS is designed to make it easy for the partners to customize their own modules. Some of these modules will inevitably need to be localized. There is certain information that can be useful in these cases and steps that can be taken to make it easier to do so with utmost efficiency. In the picture below, there are useful examples of typical modules that can be added to the LS One POS. It displays how they are connected to the System Core.

 

Common customizations:

  • Localize EFT (credit cards) functionality
  • Localize End of day (EOD) operation
  • Change item return logic
  • Add a new operation by implementing the blank operation

 

 

First we will take a closer look at the services: Lesson 10 - Services