Deliverables
- We have developed a functionality to automatically generate commission reports, listing the commission amounts for sales reps based on the start and end dates of the month for which the report should be calculated.
Development of a custom interface:
- To automate the entire process, we have provided a custom interface where the user can input the date range for calculating the commission amount. After doing so, users themselves can execute the script and send the commission reports to the sales reps.
- Within this interface, users can specify the start and end dates of the month for which they want to calculate commissions.
- Once the date range is entered and then saved the custom record entry, users will see a button labelled ‘Review Commission Report‘. By clicking this button, users can access the commission report for the selected month.
- After reviewing the commission report, users can click the ‘Execute Commission Report‘ button in the custom interface to initiate the script execution and send the commission report to the appropriate sales reps.
Generating Commission Report:
- We have developed a saved search based on the conditions like;
- Only paid in full invoices will be considered for commission calculation.
- The commission percentage of currently existing sales reps is 6%
- If the invoice is not paid in full even after 50 days from the invoice creation date, then the commission percentage will be reduced by 1%.
- The amount of non-inventory items will be removed from the total as non inventory items are not considered for commission calculation.
- Only inventory and Kit items will be considered for commission calculation.
- The commission percentage will be calculated on the discounted amount if any discount is applied to the order.
Automatically Sending Commission Report to Sales Reps
- To send the commission report to the appropriate sales representatives, we have developed functionality that prepares a CSV file listing the paid-in-full invoices for each sales rep and automatically sends these to the respective sales reps.
- When a date range is entered in the custom interface, as mentioned in the above point, the script will consider the invoices that satisfy the conditions mentioned, also the invoices that were closed within the specified date range.
- Upon clicking the ‘Execute Commission Report’ button on the interface, the sales reps will receive their commission reports, which are prepared using these invoices.
- Once an invoice is used for commission calculation and the report is sent, we will flag this invoice and ensure it is never used for any future commission calculations.
- To flag such invoices, the custom checkbox field on invoice named ‘Commission Report Sent’ will be mark checked once the report is sent to sales rep.
Testing steps
- Login to NetSuite account.
- Navigate to the custom interface to review and execute the commission report and then trigger the automated emails to sales reps : ‘Automated Commission Report’
Transaction –> Custom –> Automated Commission Report
- Create new entry from this custom record:
- Enter the name for this entry, enter the date range : From date and To date and then save the record.
- Corp design sends the commission report to sales reps once every month. So, for future reference, the name for these custom record entries can be given the month name. For example, if the commission report is calculated for november, then the name can be ‘Commission Report For November’ and so on.
- Once this custom record is saved after entering the details, we can see a button named ‘Review Commission Report’.
- Upon clicking this button, we can review the list of sales reps who have a commission amount greater than $0 for the given date range, and we have the provision to select the sales reps for whom the commission report email should be received when the script is executed.
- In this commission report, the user can select all the sales reps in the list using the ‘Mark All’ button.
- After reviewing the list, the user can send the commission report email to the sales reps selected in this list just by clicking on the button ‘Execute Commission Report’.
- Once the script execution starts, the status field in the custom record will be set as ‘Processed’
- And, once the script execution is completed, it will be set to ‘Completed’
- The automated commission report emails was successfully sent to the sales reps.
————————————————————————————————————————-
Scripts developed for this customization: jjknowledgebase.com/post/59912