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
- Users create the rule in
/form/salespointrewardrules. - Rules are attached to Customer, and can be limited further by product or transaction conditions through the formula.
- Sales and POS evaluate the rules when rewards or points are recalculated.
- 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
- Open General / Rules / Point Reward Rules.
- Click Add to create a new rule.
- Fill in Code, Description, and Display Name.
- Choose the rule category according to where it should be evaluated.
- Use Variables and Functions to build the formula.
- Write a formula that returns point quantity.
- Save the rule and attach it to the intended Customer or Customer Group setup.
- Test in Sales, Sales Order, or POS and compare the point result with the promotion policy.
Form Fields
| Field | Required | Explanation |
|---|---|---|
Code (id) | Yes | Numeric rule code used in customer point rule lists. |
Description (description) | Yes | Full rule name, for example "1 point per 10,000". |
Display Name (displayname) | Yes | Short display name shown in compact views. |
Category (category) | Yes | Controls whether the formula is evaluated from product or transaction context. |
Formula (formula) | Yes | Expression that returns point quantity. |
| Variables and Functions | No | Helpers 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
- The formula returns the number of points earned.
- Use transaction amount variables when points are based on invoice value.
- Use quantity or product variables when points are based on selected items.
- Use
floorto 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 Group | Examples | Notes |
|---|---|---|
| Transaction amount | grossamount, netamount | Used for value-based point rules. |
| Product and quantity | productid, qty, subtotal | Used for product or quantity based points. |
| Customer | customerid, customergroup | Used 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
| Function | Example | Use |
|---|---|---|
round | round(grossamount / 1000) * 1000 | Round a calculated value. |
floor | floor(qty / 10) | Return a whole number, commonly used for buy X get Y rules. |
ceil | ceil(qty / 12) | Round up when a minimum package should count as one. |
min / max | min(10, percentdisc) | Limit a result to a safe range. |
stackeddiscount | stackeddiscount(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
| Need | Example Formula | Result |
|---|---|---|
| 1 point per 10,000 gross | floor(grossamount / 10000) | Returns whole points from invoice amount. |
| Double points above 1,000,000 | grossamount >= 1000000 ? floor(grossamount / 5000) : floor(grossamount / 10000) | Gives stronger point rate for high value invoices. |
| No points below minimum | grossamount >= 50000 ? floor(grossamount / 10000) : 0 | Returns 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.