Open Workperiod on login

Only a small tutorial, but made this up this afternoon for someone who wants to give his staff access to open work periods, not close them… and not allow them into the Menu Item area.

Flow:

Manager or Supervisor logs in when a workperiod is closed > Question asked if work period should be opened

If NO is pressed then:

If YES is pressed then:

First off, lets make an Automation Command

Name: WPL_Start Work Period
Button Header: Start Work Period

Then we need to create 2 Actions:

Name: WPL_Start Work Period
Action Type: Start Work Period

Action Name: Ask Question Generic
Action Type: Ask Question
Parameters:
Question: [:Question]
Buttons: [:Buttons]
Automation Command Name: [:Automation Command Name]
Backgroud Color: [:Background Color]

Then we need to create 4 rules:

Rule Name: WPL_User Login
Event Name: User Login
Execute Rule If: Matches All

Add Custom Constraint:

Role Name EQUALS YOURROLE (Add as many role constraints as needed)

ACTION

Ask Question Generic
Constraint: [('{SETTING:ISCURRENTWORKPERIODOPEN}')] == 'FALSE'
Question: Work Period is CLOSED\rWould you like to open one now?
Buttons: Yes,No
Automation Command Name: WPL_Start
Background Color: Red

Rule Name: WPL_Start Work Period
Event Name: Automation Command Executed

Custom Constraints:
Execute Rule If: MATCHES
Automation Command Name EQUALS WPL_Start Work Period

ACTION

WPL_Start Work Period

Rule Name: WPL_Yes Click
Event Name: Automation Command Exectued

Custom Constraints:

Execute Rule If: MATCHES

Automation Command Name EQUALS WPL_Start
Command Value EQUALS Yes

ACTIONS

WPL_Start Work Period

MSG TEST:
Message: Work Period Has\rBeen Started

Rule Name: WPL_No Click
Event Name: Automation Command Exectued

Custom Constraints:

Execute Rule If: MATCHES

Automation Command Name EQUALS WPL_Start
Command Value EQUALS No

ACTIONS

MSG TEST:
Message: Work Period Has Not \rBeen Started


Hope it finds you well, to be fair its my first tutorial which isn’t something broken and un-needy :slight_smile:

Matt

1 Like

Reserved, Just incase :slight_smile:

EDIT

I Have changed a couple of things to this already. It now gives a personalised message to all staff who login.

This is an EDITED version of the Rule above!

Changes:

Constraints:

Execute Rule If: MATCHES ANY

You need to all ALL role names who have permission to open a work period

ACTION:

Ask Question Generic

Question: Good Morning {:CURRENTUSER} ! \rThe Work Period is currently CLOSED\rWould you like to open one now?

NEW RULE:

Name: WPL_Employee MSG
Event Name: User Login

Execute Rule If: MATCHES ANY

You need to all ALL role names who DO NOT have permission to open a work period

ACTION:

MSG TEST:

Constraint: [('{SETTING:ISCURRENTWORKPERIODOPEN}')] == 'FALSE'
Messge: Good Morning {:CURRENTUSER}!\rWorkperiod is CLOSED\rPlease get a Manager\rTo start the Workperiod

What is allowing you to get into POS without a work period open?
Is it a navigate to action on login?

1 Like

yah, its still because of my switch user function. I have the one you helped me with still set up. Havent moved it to the 3 terminal system yet…

Matt

1 Like

@GreatShakesBar i have tried to implement this. I get some changes in my settings. I don’t have Msg test i have added it in action part and tried to configure but can’t.


POP Up opens, if work period close ask for Yes or No, if yes given work period doesn’t start.

Looking at your ask question in the first screen shot you havent used the automation command field. You need to add thst and put WPL_Start Work Period in it so it fires the next rule when you press yes.

At the moment there isnt a link between the ask question in the first rule and the second rule which is why your second rule isnt working

1 Like

@RickH Thanks for your comment

I saw it that’s why i posted this image, I my settings i don’t have any option to add automation command. How i get that field?

You need to add [:Command Name] in the action settings.
You will need to remove the action from the rule, save and re add it to the rule to update the fields with the ones of the updated action.

Automation Command Name is hard-coded in the Action itself according to the Tutorial, not as a variable parameter. So he doesn’t need that.

MSG Test is a Show Message Action with [:message] as a parameter. The Action is not shown in the Tutorial, but you need to define that Action.

Thanks bro, great help for me.I solved message part now.

thanks bro awesome help