Problem creating program streams in a java database application

I have created a database of hardware in SQL. The database must be connected to Java, everything is done up to now, even the screen designs. However, there is a problem that I can not imagine / design how the application should work as a program flow. There is a login for employees, and employees use this application in their shop.
When the customer arrives and what to buy something. I realize it's a very vague and strange question, but how do you do that?