So starting with actions we will need;
- Logout User
- Execute Automation Command
- Login User
I have used fairly generic actions using [:xxxx] to make all fields available within the rule.
Logout User Action
Execute Automation Command Action
Login User Action
We then need 2 rules;
- NumberPad Entered Event Rule
- Automation Command Executed Event Rule
NumberPad Entered Event Rule
The {REPORT SQL DETAILS:SELECT Name FROM Users WHERE PinCode = '[:NumberpadValue]':F.Count}
report expression queries database to check if the numberpad entered value matches any user pins.
If it returns a username - ie numberpad value matches a user pin the rule fires. Closes ticket and Logs Out User
The Execute automation command action triggers in the background allowing the close and logout to happen before triggering the login action in the next rule. The numberpad value entered which we know matches a user pin is passed in the command value.
Automation Command Executed Event Rule
This second rule is triggered by the execute automation command above after other automation has completed. Then logs in the user with the pin swiped/entered using the command value (numberpadvalue) passed from the previous rule.