CDU-715
Requirement
The automation is used to send the spiff reports via email. This automation script will run at the end of each month and send the spiff data to the appropriate spiff person in CSV format.
Our Solution
We will take a copy of the existing spiff report search. In the new search, we will add two new columns. Based on this column we will determine whether the monthly spiff report email is sent to the spiff person or not.
The new search columns are named “automate spiff report” and “send spiff report”.
The first column, “AUTOMATE SPIFF REPORT” assists us in identifying a spiff person for email automation; there will be links labeled “Automate spiff“. When the user clicks on this link, Netsuite is directed to another page where the monthly spiff report automation can be configured. Using the inline edit functionality on the new page, we can flag the vendor/spiff person as to whether the spiff report was required to be sent or not. The flagging will be determined by the column value “send spiff report”. This will be a check box that users can manually check and uncheck.
The second column, “SEND SPIFF REPORT” tells us whether the flag value is true or false. Depending on this value, we will send a spiff report email to the spiff person. If this value is true, we will send the spiff report via email; otherwise, the report will not be sent.
Map-reduce script
- This will be a scheduled script, working on the 28th day of each month.
- The script will fetch details of each spiff person and send them.
- If we send the email report to the spiff person, the script will flag the invoices belonging to that report. The flagged invoices will not be considered in the coming month spiff report automation.
- The data will be sent in the format of CSV(attached with the email body).
- We will be only sent the report to the spiff person if the spiff amount is greater than or equal to 100 dollars.
Assumption
- We will not consider the bill creation for spiff person in this proposal.
- Only send the spiff report to the spiff person, if the “send spiff report” check box is true.
- We will add a checkbox field to the vendor record to indicate whether the vendor is a spiff person or not. We only displayed the spiff person on the second page of the spiff report (Automated spiff link page). The client must provide the data for differentiating spiff person.
- We will consider “on or after” a specific date for the spiff report. Only consider those invoices in the spiff report automation.