In this section we will show four examples of logics that calculate different types of rebates:
- Tiered rebate – based on quantities or amounts purchased.
- Stepped rebate – tiered rebate where the rebate is calculated separately for each tier.
- Growth rebate – based on a specified increase in purchases.
- Fixed rebate – not dependent on the purchased amounts.
See also the RebateManager Calculation Logic Examples Rebate Variants section below for detailed explanation of the rebate types.
Tiered Rebate
The complete calculation logic will have the following elements:
...
From 3.8 Manhattan, api.retainGlobal can be set to true by default in /wiki/spaces/DEV/pages/99575741 General Settings.
Code Block | ||||
---|---|---|---|---|
| ||||
api.retainGlobal=true |
...
Code Block | ||||
---|---|---|---|---|
| ||||
if (api.isSyntaxCheck()) return rebateRecords.add() |
Stepped Rebate
The complete calculation logic will have the following elements:
...
From 3.8 Manhattan, api.retainGlobal can be set to true by default in /wiki/spaces/DEV/pages/99575741 General Settings.
Code Block | ||||
---|---|---|---|---|
| ||||
api.retainGlobal=true |
...
Code Block | ||||
---|---|---|---|---|
| ||||
if (api.isSyntaxCheck()) return rebateRecords.add() |
Growth Rebate
The complete calculation logic will have the following elements:
...
From 3.8 Manhattan, api.retainGlobal can be set to true by default in /wiki/spaces/DEV/pages/99575741 General Settings.
Code Block | ||||
---|---|---|---|---|
| ||||
api.retainGlobal=true |
...
Code Block | ||||
---|---|---|---|---|
| ||||
if (api.isSyntaxCheck()) return rebateRecords.add() |
Fixed Rebate
The complete calculation logic will have the following elements:
...
Code Block | ||||
---|---|---|---|---|
| ||||
if (api.isSyntaxCheck()) return rebateRecords.add() |
Rebate Variants
The following types are only examples, in Pricefx you can set up any rebate type Condition Type you need.
Tiered Rebate
This is the simplest rebate type that is based on quantities or amounts purchased by the customer. The tiered rebate type defines several tiers with corresponding rebate percentages. The paid out rebate depends on the highest threshold level that has been reached.
...
Threshold | Rebate Percentage | Threshold Reached | Calculation | Bonus |
---|---|---|---|---|
$10,000 | 1.0% | Yes | ||
$15,000 | 1.5% | Yes | 17,200 * 0.015 | $258 |
$20,000 | 2.0% | No |
Growth Rebate
The growth rebate type is based on a specified increase in purchases. Again, several tiers are defined and the paid out rebate depends on the threshold that has been reached.
...
Threshold | Rebate Percentage | Threshold Reached | Calculation | Bonus |
---|---|---|---|---|
10% | 1.0% | Yes | ||
20% | 1.5% | Yes | 17,200 * 0.015 | $258 |
30% | 2.0% | No |
Stepped Rebate
The bonus is paid for each tier whose lower threshold has been exceeded but only from the value that is within the tier limits and the percentage specified for that tier is applied.
...