Tracking Controller
Tracking Routes
PULLsalestracks
PULLsalescarryover
QUERYbids
GETbid
UPDATEbids
REMOVEbid
CREATEbid
PREPsalescommish - NEEDS REWORK (tracks -> bids)
Pulls a list of all track items that are ready to be paid
- @param { object } pack
- @param { string } pack.dept
- @param { number } pack.cutoff Month to calculate to (Jan = 0, Feb = 1, etc.)
- @returns { object } { cons1: {totals, list}, cons2: {totals, list}}
PAYOUTsalescommish - NEEDS REWORK (tracks -> bids)
Marks track items as “paid” after manager approval
- @param { object } pack.lists Currently assuming the output of TracksToPay { cons1: {totals, list}, cons2: {totals, list}}
- @returns { object } report of what happened
GETsalesanalytics
Generates the sale metrics for the grouping determined by the provided filters.
- “Summary” or “Detail” styles can be requested.
- @param { object } pack
-
@param { string |
string[] } pack.estimator |
-
@param { string |
string[] } pack.dept |
-
@param { string |
number } [pack.year] |
-
@param { string |
date } [pack.startdate] |
-
@param { string |
date } [pack.enddate] |
-
@param { string } [pack.indicator] “sold” |
|
“invoiced”; defaults to “sold” |
-
@param { string } [pack.type] “summary” |
|
“detail”; defaults to “summary” |
-
@returns { Promise <{ success: boolean, msg: string, result: object |
null, lvl: string }> } |
SalesBasics
The basics shown in “Summary”-style displays
- No filters, sorting, breakouts, etc.
- Takes in a list and runs these basic metrics on it
-
-
-
-
- leads (Opportunities) [gleads - cancels]
-
- wins (Opportunities Won/Closed)
-
- close (Close/Win Rate) [Wins / Leads]
-
- rpo (Average Revenue per Opportunity) [Revenue / Leads]
-
- rpj (Average Revenue per Job) [Revenue / Wins]