Logout User action

Yeh you pretty much answered my question there.

I meant after manually closing a ticket (although its automatic after 30 seconds for me now).



I followed your instructions to the letter but I cant get the system timer to trigger and logout the user. I even imported your file and followed your instructions on the follwoing posts twice over!

As I understand it this setup will automatically log off a user who after a certain periode of time e.g. 30 seconds created and submited (closed) a ticket. Am I right?

Hard to say what could be wrong. Either there is a typo, or the Ticket isn’t being marked as closed properly.

What version are you running?

I am running the most recent version of SambaPos. I even deleted all changes related to this function and typed them back in. I was testing this function when there was no open ticket and still no logout.

If it does not work for me thats ok. But I would like to know since you are testing a newer version of SambaPos does this version come with an “inactivity time logout function”?

Your doing something wrong. Please post some screenshots so we can help you. If I had a dollar for every time someone came on the forum tried to follow a tutorial and it didnt work and then said “I followed it to the letter” I would be rich. Almost every time it is something they missed while following it to the letter :stuck_out_tongue:

It does not come with what your asking for. It does however have the same option as v4 to create this yourself just as @QMcKay has demonstrated.


@Aksel, did you add a default mapping (* * * *) to all your Rules? You must do this, otherwise a Rule will never fire.

ahhh that could be it!!! I must have missed the mapping instruction bit so I left them all blank. Thanks for the hint!!! I will try it out latest Monday and let you know :smile:

1 Like

FYI, we rarely mention that Rules should have a mapping - we almost always leave that part out, because it is a “given” or “common knowledge”, and we assume that most users know this is required. From time to time, a new user isn’t aware of this, so it must be re-iterated…

:exclamation: All Rules require a Default Mapping (* * * *). Without a mapping, a Rule is disabled, and won’t do anything.


… It also warns when rule maps left empty and display rule name in gray color to indicate inactivity. Maybe I should improve warning message…

I would rather it add the mapping automatically by default.


@ QMcKay

Login and go to the POS/Ticket Screen.
Let it sit there for the timeout value (i.e. 30 seconds).
nothing happens - you are still logged in, because you haven’t > created a Ticket, nor Closed one, which is required by the first solution >

with the line from the first option:


The system will still log me out if I just let it sit in the POS/Ticket Screen. It wont log me out if I switch between different main screens. Did I do something wrong?
If not is there any chance of making this a true “inactivity timer”? What I would like is that if somebody creates a new ticket and submits it/closes it the system will trigger an “inactivity timer” of lets say 7 seconds unless a new or current ticket is opened/ selected ? However, if somebody does not create a ticket/ closes a ticket the “inactivity timer” will not trigger

That is exactly what he showed you. And this is a true timer in that regard.

Something else is probably not working can you show some screenshots of your setup maybe we can spot a typo or a mistake.

@aksel, it sounds like you want to use the first posted solution only, and that is fine. Just use what is detailed here:

Do not implement the second post additions, detailed here:

BTW I want to add in testing this if you are logged in as Admin and you do not specifically set in the Logout User Action to enable the Logout Admin option it will not fire. Even if you leave that part of the action blank it still will not fire you specifically have to set it to true if you want it to fire for testing when logged in as Admin.

EDIT: It seems this was only for V5 a future release. Very sorry for confusion.

Like i previously said i had this issue when doing 100% staff discount with entity added and then auto logging out and the whole process happening at the same time causing a screen switch issue. I dont use the “built in” auto logout feature and i have manually added logout user action to specific rules where i want log out to occur. With my example above logging out at the same time as adding an entity and applying a discount resulting in the ticket being “paid” caused me an issue and auto logout was the problem, without this everything else worked perfect.

The solution - Auto logout with a delay, like your asking for, i only have this applied to rules where a screen switch was causing me an issue such as when ticket was closing, here is my setup for it

Create an Automation Command "Logout User - Delay"
No mapping needed as we’re not creating a physical button

Create an Action - "Logout User - Delay"

Create another action (if you dont already have it) - "Logout User"

Create a Rule - "Logout User - Delay"

Now for all of the above to work i simply need to add the ACTION “Logout User - Delay” into the rule where i want logout to occur when ticket is closed, in my case it needs to be in my 100% staff discount rule below

So what you would need to do now is simply put the ACTION “Logout User - Delay” into whatever rules you have where you want the ticket to close and then “wait” before logging out, or apply it to a ticket closing rule, so everytime a ticket closes eg when you go into “tickets” from the main menu and close a ticket not just when a ticket closes at the end of a sale the logout delay kicks in.

Obviously change my 1 second in the action to whatever you want :smile:
hope that helps


@kendash is the logout admin parameter in the logout user action only available on V5, i have the lastest V4 and that option is not available on the logout user action

1 Like

Hmm that could be let me check. You are correct so I will change my post for V5 specifically @emre must have snuck that one in on us lol. Sorry for that. I will ensure I test stuff on V4 to ensure consistency when helping forum.

No probs, i like it when you sneak in these little updates here and there haha :slight_smile:

That said it looks like that feature will solve many of your issues you had in past with your auto logout :stuck_out_tongue:

@Aksel please scroll above and look where @QMcKay said:

1 Like

So I needed to change the times because it logs out too quick for me, id like to increase it to 30 seconds on everything except the screen change as it is too fast in-between customers during the day. Id like to make this 120 seconds.

What ill change is:

Rule - Ticket Closed - fire Execute Automation Command Action with:

AMCname: AL AutoLogout
delayseconds: 30


Rule - AL Screen Change

Change action AL Execute Automation Command

delayseconds: 120

Modify the Rule AL AutoLogout and add this Constraint to the Action called AL Logout User:

[=(TN('{DATE:HH}')*60*60+TN('{DATE:mm}')*60+TN('{DATE:ss}'))-TN('{SETTING:ALtime}')] >= 30