Summary
Property triggers are an advanced form of trigger that allow a varied mechanism by which something can be considered active. For example, suppose one wishes to trigger a menu section that is only active when the account's total is above a certain dollar threshold, or perhaps a price level is active only on the week of a customer's birthday.
Perhaps, even, it's 'B' week in the store, and any customer whose name begins with 'B' will trigger access to a special 'B' combo.
Creating the Trigger
Navigate to the Triggers screen in OfficeMate
Editing the Trigger
The Property
A Property Trigger is composed of a comparison, that is 'Activate when X compares to Y'. For example 'when the Customer Name begins with 'B''
The Property component is composed of three parts: The Operator, the Class and the Property. This is where it gets a little tricky. We have a few classes that we can examine, such as the account, the customer, the trading day, the user and the shift. There are numerous properties accessible on those classes. For example, Account has a property savedTotal (the total amount), timeDue, comment, eta, creationDateTime, etc. Customers have firstName, lastName, title, dob. So to access an account's savedTotal, the format is account.savedTotal. A customer's date of birth is Customer.dob. The available properties will need to be retreived from a developer
Now to the operators. We have the following: NoOp, Week, DayOfMonth, Month, Price, Integer, Double
NoOp is a no operation, meaning that whatever the property is, that's it.
The Comparison
The Comparison is composed of three main parts, the Property to be compared, the comparison method and the Value against which to compare.
The Comparison method currently supports four types: Equals, Starts With, Before Inclusive and After Inclusive. The Equals means a perfect match between a property. The Starts with is for String based comparisons, such as 'Does Customer.lastName Start With 'B''. The Before and After Inclusive are for things like 'Is Account.totalValue After (greater than) $20'
More comparisons may be added in the future.
Value Operation
I can explicitly set dates in the value (sort of the same thing as a date trigger). There is a special <NOW> and <null>, along with <date>dd/MM
Week will try to use the property value as a date, and then give the numeric week of the year of that date, So week(Customer.dob) will convert the customers' date of birth in to a numerical week for comparison.
DayOfMonth and Month get the date and the month (so you can have have month long triggers)
Price, Integer and Double convert whatever the value is into a Price, a Double (floating point arithmetic) and Integer (whole numbers) values. So we can say Integer(account.savedTotal) to convert the total account value to a whole number.
The Value
Values are set by the user to define what the property will be compared against. By default, they are strings (letters and words). If, however, you want to convert these to numbers for comparison, you will need to use either Price, Double or Integer operations. For example, To make a trigger active when the account total is above $20, I would have :
account.savedTotal After Price(20)