Function | Description | ||||||||||||||
IF(condition, function(s), function(s)) | This function takes a condition (see previous table) as the first argument and a function or functions for the second (and possibly the third) argument. If the condition evaluates to TRUE, the function(s) in the second argument are executed. The third argument is optional and can contain functions to evaluate if the condition evaluates to FALSE. Example: IF(DOW(SUN),DISCOUNT(10), DISCOUNT(5)) If the day of the week is Sunday, then the discount is 10; otherwise the discount is 5. | ||||||||||||||
ADDPRICE(amt) | amt can be an amount to add to the price or a mathematical expression (identical to the Points4Sale expression) which is evaluated. So, ADDPRICE(COUNTMODS(,,MOD1)*3) adds to the price $3.00 for each MOD1. This evaluation also occurs when using SETPRICE.
| ||||||||||||||
BONUSCASH(percent, dollar amt, TRUE) | The Bonus Cash Rule is based on this Dynamic Pricing Rule function. Example: BONUSCASH(10) is 10% of the load amount as bonus cash to the card; BONUSCASH(0,5) adds a flat $5.00 bonus cash to the card. | ||||||||||||||
BONUSLOAD(percent, dollar amt, TRUE) | Dynamic Pricing Rules can now allow a flat dollar amount load of Bonus Cash even when the load amount for the card is zero. Example: Using a Dynamic Pricing Rule with a % amount for Bonus Cash (BONUSCASH(10)) and with the load amount on the Debitware tab for the item as zero, results in the following: 1. Place following line in the Debitware item: BONUSLOAD(,10,TRUE) In Sales, the Bonus Cash amount was $10 and the load amount was zero (the $10 came from the Bonusload macro) 2. Then, take the BONUSLOAD(,10,TRUE) line out of the Sales Action tab. In Sales, the Bonus Cash amount was zero, and the load amount was zero. 3. Change the Dynamic Pricing Rule to be BONUSCASH(,10). In Sales, the load amount was zero and the Bonus Cash amount was $10. Note: The macro ignores any previous calculations performed through BONUSCASH unless the BONUSLOAD macro includes the TRUE statement. | ||||||||||||||
SETPRICE(price) | Changes the price of the item to the argument. | ||||||||||||||
SETBASEPRICE() | Takes no arguments. Sets the price as calculated by the “normal” pricing scheme (using schedules and day of week and everything). Warning: For advanced use only. | ||||||||||||||
PREVENTUSE(display-text) | Disallows the product from being sold. If display-text is passed, a message box is displayed to the operator. | ||||||||||||||
DISCOUNT(pct, amt) | Discounts the price of the product by a percentage and an amount. | ||||||||||||||
GETFIELD(fieldname) | Used to access any numeric field in the item record. Example: IF(QTY(>=5),GETFIELD(ADMISSIONS)*1.25, GETFIELD(ADMISSIONS)*2.5) This rule says to multiply the number found in the items.admissions field for the item being sold by 1.25 if the line item quantity is greater than or equal to 5; otherwise multiply the number found in the items.admissions field by 2.5. | ||||||||||||||
MULT(fac) | Multiplies whatever the price of the product is by the factor. | ||||||||||||||
ROUND() | Rounds the price to two decimal places. An argument can be provided for rounding to a certain dollar increment. For example, 1.00 would be rounded to a dollar, 0.25 would be the nearest quarter, etc. Note: All rounding functions execute at the end of all other calculations. Rounding does not occur at specific intervals based on where the ROUND() function is placed within a rule. | ||||||||||||||
ROUNDUP(),ROUNDDOWN() | Both work identically to ROUND except that they round up or down. Example: Using a price of $2.31 • ROUND(0.25) - Rounds to the nearest quarter ($2.25) • ROUNDUP(0.25) -$ 2.50 • ROUND(1.00) - $2.00 • ROUNDUP(1.00) - $3.00 | ||||||||||||||
DONATIONROUNDUP() | Rounds up the sale total to the nearest whole dollar amount. It can take an optional argument to round up to any arbitrary amount. Example: DONATIONROUNDUP(10) rounds to the nearest $10.00 (if the current sale total is $21.25, the price of the donation item would be set to $8.75 resulting in a sale total of $30.00). DONATIONROUNDUP(1) is identical to DONATIONROUNDUP() and rounds the sale total to the nearest $1.00 (if the current sale total is $5.88, the price of the donation item would be set to $0.12 resulting in a sale total of $6.00). The price of the donation item, once it is added to the sales invoice, is adjusted each time something else is added to the sale, so the donation item can be added anywhere in the sale process. | ||||||||||||||
SUB(macro-name) | Loads another Dynamic Pricing Rule, using the text in the description. | ||||||||||||||
SKIPNEXT(function) | Finds the occurrence of the function specified and removes it. Example: SKIPNEXT(IF) IF( DOW(WED) , DISCOUNT(10)SKIPNEXT(IF)) IF( TRUE, DISCOUNT(10) ) | ||||||||||||||
GETPRICE(#) | Takes a single argument, from 1 to 42, which gets the price from the item record as set in SysManager. For reference, 1 corresponds to monday_0, 7 to sunday_0, 8 to monday_1 and 42 to sunday_5. | ||||||||||||||
GETEXCHANGEDPASSNO | Ensures correct pass or ticket numbers are voided when payment plans have declined payments, particularly when exchanges or refunds have occurred on the tickets or passes. | ||||||||||||||
SETTAX(num,rate) | Sets the tax rate for an item. The type of rate, Tax 1 or Tax 2 and the percentage must be specified. Example: To set Tax 1 to 3.25%, use the function: SETTAX(1,3.25). This function is useful for removing tax for tax exempt institutions. For example, you can use a rule like this for a tax-exempt account: IF(DCI(ACTIVITIES,ATTRACTION),DISCOUNT(10))SETTAX(1,0) | ||||||||||||||
IGNOREADM() | Used to bypass the per admission calculation for items configured with admissions greater than one. Example: IGNOREADM()SETPRICE(100) This yields a price of 100 regardless of how many admissions an item may have. | ||||||||||||||
IGNOREACCTRULE() | If used, this function ignores any Dynamic Pricing Rule associated with an account linked to the sale/item when determining the price of an item. | ||||||||||||||
IGNOREQTYMULT() | This instructs the parser to ignore the implicit multiplication by quantity. IGNOREQTYMULT()SETPRICE(80) would let the item have a price of eighty regardless of quantity. This allows the final price of an item, after quantity is applied, to be more strictly controlled. Also, this causes rounding following the application of a special to be applied to the extension price. For example, the final price after being multiplied by quantity. Modifiers are always added to parent items in the quantity of the parent item. | ||||||||||||||
MOVEREVENUE(OLD_PR_CTR, NEW_PR_CTR,20, 10, D,C,I, SALESPOINT, OPERATOR) | The Recognize Revenue Rule is configured in SysManager > Activities > Item/Sales Lists > Dynamic Pricing Rules. The rule must be configured as a rule type of Any or Recognize Revenue Rule to be assigned to a ticket or pass item in the Global Settings tab of the item’s template. With current functionality the rule must follow the following syntax: MOVEREVENUE( OLD_PR_CTR, NEW_PR_CTR, 20, 10, D,C,I, Salespoint, Operator) where MOVEREVENUE is the function, OLD_PR_CTR is the deferred profit center, NEW_PR_CTR is the non-deferred profit center, 20 is the percent of the deferred profit center to be moved to the non-deferred and 10 is the flat dollar amount to move from the deferred profit center to the non-deferred profit center. Either percent, flat dollar amount or both can be used in the rule. The value is set to “0” if not used. D,C,I is the department, category and item nickname of the item that is attached to the profit center adjustment in the data, Salespoint is the optional salespoint that is written to the data (scanner location if not specified), Operator is the optional operator (blank if not specified). | ||||||||||||||
MACRO MACROCLEAN() | Used to specify actions to perform on the sale of an item. These actions are evaluated only on the first day of the sale of the item and are only performed when the item is added to the sale. The argument is what is to be added to the do_on_sale field for the item. Example: if(hasmod(,,CANDY),MACRO(SPECIAL("DUMMY "))) Also available is the function MACROCLEAN, which eliminates any previous do_on_sale commands. Example: if(hasmod(,,CANDY),MACROCLEAN()MACRO(SPECIAL("DUMMY "))) To remove a special applied with the MACRO function in a Dynamic Pricing Rule, use one of the following macro commands: • NOSPECIAL() which removes the special on the currently selected line item. • NOGLOBALSPECIAL() which removes the global special for the sale See the Salesware Sales screen action macro Commands document for a list of available macros. | ||||||||||||||
MACRO2 MACROCLEAN2() | Same as MACRO, but if the macro needs to be re-run every time the price is changed (for example, if it depends on modifiers), and then the MACRO2 and MACROCLEAN2 functions must be used. Example: if(HASMOD(,,CANDY),MACRO2(SPECIAL("DUMMY "))) if(HASMOD(,,CANDY),MACROCLEAN2()MACRO2(SPECIAL ("DUMMY "))) See the Salesware Sales screen action macro Commands document for a list of available macros. | ||||||||||||||
MACRO2(NOACCOUNT()) | Detaches any account from a line item. An auto-sold item is prevented from being put on account by using this as a Dynamic Pricing Rule attached to the item. | ||||||||||||||
VOIDPAYMENTPLANPASS | Used to void payment plan passes. | ||||||||||||||
WEIGHT(PricePerUnit, Units) | Used when an item is priced using a scale. For this rule to function, the SysManager > Activities > DCIs > New/Edit > Price tab > Price Calculated By Weight check box must be unchecked. PricePerUnit is the price that is charged per unit specified by Units. Units can be any unit that appears in the SysManager > Activities > DCIs > New/Edit > Price tab > Unit of Measure dropdown. Example: WEIGHT(0.25, oz) For more information, see the Salesware Retail document. | ||||||||||||||
Saleround() | Takes a single, required parameter. SaleRound allows for the rounding of the final price of a sale to the value defined by the required parameter. Example: Saleround(.05) rounds as follows: If the sale amount's final cents is 1 or 2 cents, the amount is rounded down to the nearest 10 cents; 3 and 4 cents are rounded up to the nearest 5 cents ; 6 and 7 cents rounded down to the nearest 5 cents; and 8 and 9 cents rounded up to the nearest 10 cents. To employ this new Dynamic Pricing Rule to create a zero dollar item with the SaleRound Rule, apply it to the sale after all items have been entered. With the addition of this pricing rule, it is now possible for Dynamic Pricing Rules to return a negative value. |