Point Reward Rules

Guide for creating customer point reward rules for sales transactions with formulas evaluated by ExpressionCalc.

Menu Route

General Rules

/form/salespointrewardrules

When to Use This Form

Use this form to create rules that calculate customer points from sales transactions. The formula result becomes points earned by the customer.

Points from Amount
Give points from gross amount, subtotal, selected brand, product group, or supplier amount.
Points from Quantity
Give points based on quantity purchased in selected products or categories.
Campaign Points
Give additional points for a specific customer group, salesperson, or campaign period.
This form only manages points earned. Product rewards and sales discounts use separate rule forms.

System Overview

  1. Users create the rule in /form/salespointrewardrules.
  2. Rules are attached to Customer, and can be limited further by product or transaction conditions through the formula.
  3. Sales and POS evaluate the rules when rewards or points are recalculated.
  4. The formula result is added to customer point movement and can be used later by payment types that consume points.
Point result should be numeric. Use rounding deliberately so users can explain point totals to customers.

Before Creating a Rule

Requirement
Customer point feature is active.
Requirement
Customer master data is prepared and point payment settings are understood.
Requirement
The formula result has a clear business meaning, such as one point per 10,000 sales amount.
Requirement
The team knows whether points are calculated from gross, net, selected products, or transaction totals.

Workflow

  1. Open General / Rules / Point Reward Rules.
  2. Click Add to create a new rule.
  3. Fill in Code, Description, and Display Name.
  4. Choose the rule category according to where it should be evaluated.
  5. Use Variables and Functions to build the formula.
  6. Write a formula that returns point quantity.
  7. Save the rule and attach it to the intended Customer or Customer Group setup.
  8. Test in Sales, Sales Order, or POS and compare the point result with the promotion policy.

Form Fields

FieldRequiredExplanation
Code (id)YesNumeric rule code used in customer point rule lists.
Description (description)YesFull rule name, for example "1 point per 10,000".
Display Name (displayname)YesShort display name shown in compact views.
Category (category)YesControls whether the formula is evaluated from product or transaction context.
Formula (formula)YesExpression that returns point quantity.
Variables and FunctionsNoHelpers for writing valid formulas.

Attaching the Rule to Master Data

Attach point rules to the customer setup that should receive the promotion. If points are only for selected products, include product conditions in the formula or combine customer and product rule setup according to company policy.

How the Formula Works

  1. The formula returns the number of points earned.
  2. Use transaction amount variables when points are based on invoice value.
  3. Use quantity or product variables when points are based on selected items.
  4. Use floor to avoid fractional points when the policy requires whole points.
Example policy: 1 point for every 10,000 sales amount.
Formula: floor(grossamount / 10000)
Always test rounding with values around the threshold.

Available Variables

Variable GroupExamplesNotes
Transaction amountgrossamount, netamountUsed for value-based point rules.
Product and quantityproductid, qty, subtotalUsed for product or quantity based points.
Customercustomerid, customergroupUsed to limit points to certain customers.

Use the variable selector in the form to copy valid variable names. Variable names are case-sensitive.

Functions and Formula Syntax

FunctionExampleUse
roundround(grossamount / 1000) * 1000Round a calculated value.
floorfloor(qty / 10)Return a whole number, commonly used for buy X get Y rules.
ceilceil(qty / 12)Round up when a minimum package should count as one.
min / maxmin(10, percentdisc)Limit a result to a safe range.
stackeddiscountstackeddiscount(10, 5)Calculate stacked discount logic when it is enabled in the expression engine.
Write one expression that returns one value. Avoid multiple statements. Test the formula with realistic transaction data before using it in daily operations.

Formula Examples

NeedExample FormulaResult
1 point per 10,000 grossfloor(grossamount / 10000)Returns whole points from invoice amount.
Double points above 1,000,000grossamount >= 1000000 ? floor(grossamount / 5000) : floor(grossamount / 10000)Gives stronger point rate for high value invoices.
No points below minimumgrossamount >= 50000 ? floor(grossamount / 10000) : 0Returns zero below threshold.

Testing Checklist

  • Test values below, equal to, and above the threshold.
  • Check customer point balance after saving.
  • Check whether returned or canceled transactions should affect points according to company policy.
  • Explain the point formula to cashier or customer service users.

Common Issues

  • Points do not appear: check customer rule setup and package access.
  • Points are decimal: add floor, round, or another intended rounding rule.
  • Points are too high: check whether the formula uses gross, net, or repeated line context.
  • Customer cannot redeem points: check payment type and point conversion setup.