Overview of Formulas
Formulas allow you to create and store a set of objects and operators specific to a Loyalty Program. You can calculate values based on input from third parties and then take the resulting value into account within a promotion. Similarly to other objects, formulas are available for use in other promotions.
For example, a formula can calculate the average amount spent by a member in a specified period. Then the criteria can check whether the formula is greater than a predetermined dollar amount and have an action to reward a member a percentage of the formula value.
Formulas have the following characteristics:
Associated with one Loyalty Program. A formula can be available for use by a promotion only if it is associated with the same Loyalty Program as that promotion.
Comprised of a series of operators and objects. A formula contains logical mathematical operators, numbers, and objects representing defined attributes and numeric values. It can be defined only using attributes of type number or integer.
Validated. The formula must be a valid mathematical formula. If the formula does not adhere to mathematical rules, then it is invalid and cannot be used.
Used in promotions criteria and actions. Once validated, a formula is available for use in promotion criteria and actions. When used in promotion criteria and actions, the object is the formula and the attributes are a list of user-defined formulas.