---
title: "Sales-based Reward Points System"
canonical: "https://kb.myframeworks.com.au/space/PROSTIXV48DOC/31100555/Sales-based%20Reward%20Points%20System"
format: markdown
---
The Sales-based Reward Points System is a customer reward point system where points are based at a product group level. There is a facility for csv input of reward points at a product group level with dollars required per point. There is also the option to maintain any of these product group reward point rates.  CSV Import:  If the user selects the Import Reward Points from CSV option, they are forced to select a file name to be imported. The filename entered must exist otherwise an appropriate error message is displayed stating that the file does not exist. This csv file name has the following format:  Product group/subgroup1/subgroup2/subgroup3, $ per point. An example of the csv file is: #12,5.00 #13,5.50 #14,9.00 #20/sg1,15.00 #30/sg1/sg2/sg3,25.00  For each line within the csv file, a product group rewards rate record is created.  If the product group already exists, the existing value is overwritten with the value within the csv file.  If an error occurs within the import (that is, the product group does not exist or the rate is zero or negative), then the line in error is exported out to the dump directory with the file name 'prodgrperr.csv'.  Product Group Reward Point Rate Maintenance  If the user chooses to view or maintain a product groups reward point rates, ProStix displays a standard browser maintenance screen with a list of all the product groups/subgroups and reward rates defined. The Product Group/Subgroup string can be typed directly or <F3> can be used to search for the Product Group and then <Enter> used to drill down to the subgroups. <F1> then enters this record in the table with the Reward rate field ready for an entry to be typed.  The user may opt to add, update or delete product group reward rate records from this browser.  If the user decides to add new product group reward rate records, the validation specified above is executed for both the product group and reward rates. The reward rate specifies the customer spend for a dollar of reward. The sales value is divided by this rate to get the dollar reward value. The points are then calculated using the Conversion Factor on the reward program. The reward rate % on the reward program is not used when points are calculated via the product group.  If the user chooses to update an existing record, then only the reward rate field may be changed.  If the user chooses to delete an existing product group reward rate record, they are prompted to validate the delete before the record is deleted. No further validation is performed for a delete.  Scheduled Task to calculate Reward Points for Cash Sale Customers  A periodic task is run to calculate reward points for customers, which in turn updates the customer rewards balance.  A scheduled task needs to be created via a separate setup program. This only has to be run initially to create the task within the environment. The program is called 'syssprodrew.p'. This creates the scheduled task.  The nightly task first extracts the last run date and time. Only sales and credits/cash refund entries between this last run date and time stamp and the current date and time is picked up.  If the POS Log entry has a tender type of 'other' and is marked as a reward program tender, then it is excluded. We do not want to calculate points on transactions that have been paid by reward points.  If there has been a mix of tenders used within the transaction (that is, cash and reward points), the points are only calculated on the cash value starting at the first line of the order down to that cash value amount.  The points are calculated by each order transaction, that is, for each order transaction line, the product group is derived from the product purchased and then the order line total is divided by the product group reward rate. Each line's reward value is accumulated for the order and that reward total is then added to the customer's reward total. Note that for credits, the reward total will be negative and will thus reduce the customer's reward total.  The Rewards Points Control G/L Account is then credited by the total reward points amount and the Rewards Allocated Account debited by that reward amount.  At the end of processing all the cash sale / cash refund POS log entries, the last run date and time stamp is recorded so that the next run only picks up new unprocessed POS log entries.  For example:  Product XYZ belongs to Product Group #12. Reward Rate = 5.00 Product ABC belongs to Product Group #20. Reward Rate = 15 Order 123 has 2 products.  Note : Reward points are rounded to the nearest whole point. In this example, 25 points are credited from the Rewards Point Control G/L Account and 25 points debited to the Rewards Allocated Account.  Redeeming of Points  Customers can then redeem their reward points to make purchases. The existing rewards points functionality within ProStix is used when customers redeem reward points.