QMcKay
12
Rules
Our Rule set to handle everything …

Ticket Entity Changed - Store Entity Name and Entity Balance
AS Store Account Balance
Rule Name: | AS Store Account Balance |
Event Name: | Ticket Entity Changed |
Custom Constraint List:
Entity Type Name | Equal | Customers |
Actions:
AS Store Value
Constraint:
settingName: | AS Entity Name |
settingValue: | {ENTITY NAME:Customers} |
AS Store Value
Constraint:
settingName: | AS Entity Balance |
settingValue: | [=TN('{ENTITY BALANCE:Customers}') > 0 ? TN('{ENTITY BALANCE:Customers}') : 0] |
Order Added - Change Ticket Type

AS Order Added - Change Ticket Type
Rule Name: | AS Order Added - Change Ticket Type |
Event Name: | Order Added |
Custom Constraint List:
Menu Item Name | Equal | ACCOUNT PAYMENT |
Actions:
AS Change Ticket Type
Constraint:
Pay Account via Payment Screen
AS Pay Account - Payment Screen
Rule Name: | AS Pay Account - Payment Screen |
Event Name: | Automation Command Executed |
Custom Constraint List:
Automation Command Name | Equal | AS Pay Account |
{SETTING:AS Entity Balance} | Greater | 0 |
Actions:
AS Add Order - ACCOUNT PAYMENT
Constraint:
AS Change Ticket Entity
Constraint:
EntityName: | {SETTING:AS Entity Name} |
AS Display Payment Screen
Constraint:
Account Operations (button clicked)
AS Account Operations
Rule Name: | AS Account Operations |
Event Name: | Automation Command Executed |
Custom Constraint List:
Automation Command Name | Equal | AS Account Operations |
{ENTITY ACCOUNT NAME: Customers} | Is Not Null |
|
Actions:
Close Ticket
Constraint:
AS Store Value
Constraint:
settingName: | AS Entity Id |
settingValue: | {CALL:db.getRow("SELECT Id FROM Entities WHERE Name='{ENTITY NAME:Customers}'")} |
AS ExecAMC
Constraint:
AMCname: | AS Load Account Statement |
AMCvalue: | {SETTING:AS Entity Id} |
BGcolor: | |
delay: | |
Show Account Screen
AS Show Account Screen
Rule Name: | AS Show Account Screen |
Event Name: | Automation Command Executed |
Custom Constraint List:
Automation Command Name | Equal | AS Show Account Screen |
Actions:
AS Navigate
Constraint:
module: | Accounts |
parm: | Customer Accounts |
hideHeader: | True |
Set Statement Variables
AS Set Statement Variables
Rule Name: | AS Set Statement Variables |
Event Name: | Automation Command Executed |
Custom Constraint List:
Automation Command Name | Equal | AS Set Statement Variables |
Actions:
AS Store Value
Constraint:
settingName: | AS Entity Id |
settingValue: | [=TN('[:CommandValue]')] |
AS Store Value
Constraint:
settingName: | AS Entity Name |
settingValue: | |
AS Store Value
Constraint:
settingName: | AS Account Id |
settingValue: | 0 |
AS Store Value
Constraint:
settingName: | AS Account Name |
settingValue: | |
AS Store Value
Constraint:
settingName: | AS Date Filter Beg |
settingValue: | [=('{SETTING:AS Date Filter Beg}'!='' ? '{SETTING:AS Date Filter Beg}' : '2010-01-01')] |
AS ExecScript
Constraint:
func: | db.ExecStoredScript('@@LoadEntityVariables') |
command: | |
AS Load Entity
Constraint: [=TN(‘{SETTING:AS Entity Id}’)]>0
entityName: | {SETTING:AS Entity Name} |
AS Store Value
Constraint:
settingName: | AS Entity Balance |
settingValue: | {ENTITY BALANCE} |
AS Update Entity Data
Constraint:
fieldName: | Date ZeroBalance |
fieldValue: | {SETTING:AS Entity Date_ZeroBalance} |
Load Account Statement
AS Load Account Statement
Rule Name: | AS Load Account Statement |
Event Name: | Automation Command Executed |
Custom Constraint List:
Automation Command Name | Equal | AS Load Account Statement |
Actions:
AS ExecAMC
Constraint:
AMCname: | AS Set Statement Variables |
AMCvalue: | [:CommandValue] |
BGcolor: | |
delay: | |
AS Navigate
Constraint: [=TN(‘{SETTING:AS Entity Id}’)]>0
module: | Entity |
parm: | Account Statement |
hideHeader: | True |
Print Account Statement
AS Print Account Statement
Rule Name: | AS Print Account Statement |
Event Name: | Automation Command Executed |
Custom Constraint List:
Automation Command Name | Equal | AS Print Account Statement |
Actions:
AS ExecAMC
Constraint:
AMCname: | AS Set Statement Variables |
AMCvalue: | [:CommandValue] |
BGcolor: | |
delay: | |
AS Print Account Statement
Constraint:
EntityId: | [:CommandValue] |
Load Ticket (Display Ticket)
AS Load Ticket
Rule Name: | AS Load Ticket |
Event Name: | Automation Command Executed |
Custom Constraint List:
Automation Command Name | Equal | AS Load Ticket |
Actions:
MSG TEST
Constraint: [=TN(‘{SETTING:AStid}’)]==0
MessageToDisplay: | Select a Ticket |
Display Ticket
Constraint: [=TN(‘{SETTING:AStid}’)]>0
TicketId: | [=TN('{SETTING:AStid}')] |
Set Date Filter

AS Date Filter
Rule Name: | AS Date Filter |
Event Name: | Automation Command Executed |
Custom Constraint List:
Automation Command Name | Equal | AS Date Filter |
{SETTING:ASDF} | Is Not Null |
|
Actions:
AS Store Value
Constraint:
settingName: | AS Date Filter Beg |
settingValue: | {SETTING:ASDF} |
AS ExecAMC
Constraint: 1==2
AMCname: | AS Load Account Statement |
AMCvalue: | {SETTING:AS Entity Id} |
BGcolor: | |
delay: | |
Credit Account - Ask Amount and Payment Type
AS Credit Account - Ask Values and Payment Type
Rule Name: | AS Credit Account - Ask Values and Payment Type |
Event Name: | Automation Command Executed |
Custom Constraint List:
Automation Command Name | Equal | AS Credit Account |
Command Value | Is Not Null |
|
{SETTING:AS Entity Balance} | Less | 0.01 |
Actions:
AS Store Value
Constraint:
settingName: | AS Credit Amount |
settingValue: | [?Amount of Credit;;;ONC] |
AS Ask Question
Constraint:
question: | Customer Account Credit\rCustomer : {SETTING:AS Entity Name}\rAccount : {SETTING:AS Account Name}\rCredit Amount : [=F('{SETTING:AS Credit Amount}')]\r\rSelect Method of Payment |
buttons: | Cash=Customer Cash:Orange;Gray,Cash USD=Customer Cash USD:Green;Gray,Credit Card=Customer Credit Card:Black;Gray,Credit Card USD=Customer Credit Card USD:Blue;Gray,Cancel=Cancel:Red;Gray |
AMCname: | AS Credit Account - Apply |
BGcolor: | Purple |
TPcolor: | |
Credit Account - Apply
AS Credit Account - Apply
Rule Name: | AS Credit Account - Apply |
Event Name: | Automation Command Executed |
Custom Constraint List:
Automation Command Name | Equal | AS Credit Account - Apply |
Command Value | Not Equals | Cancel |
[=TN('{SETTING:AS Credit Amount}')] | Greater | 0 |
Actions:
AS Store Value
Constraint:
settingName: | AS Payment Type |
settingValue: | [:CommandValue] |
AS Store Value
Constraint:
settingName: | AS Credit Amount |
settingValue: | [=TN('{SETTING:AS Credit Amount}')] |
AS Store Value
Constraint:
settingName: | AS Credit Description |
settingValue: | {CALL:pay.UpdateDescription('{SETTING:AS Payment Type}')} |
MSG TEST
Constraint:
MessageToDisplay: | Desc:{SETTING:AS Credit Description} Typ:[='[:CommandValue]'.substr(9,11)] cur:[='{SETTING:AS Payment Type}'.slice(-3)] PT:{SETTING:AS Payment Type} Cr:{SETTING:AS Credit Amount} AccId:{SETTING:AS Account Id} {DATE} {TIME} |
AS Create Tx Doc
Constraint: [=TN(‘{SETTING:AS Credit Amount}’)]>0
DocName: | [:CommandValue] |
AccountName: | |
AccountId: | {SETTING:AS Account Id} |
date: | {DATE} {TIME} |
Description: | [:CommandValue] - Credit Payment - {SETTING:AS Credit Description} |
Amount: | [=TN('{SETTING:AS Credit Amount}')] |
AS Navigate
Constraint:
module: | Entity |
parm: | Account Statement |
hideHeader: | True |