Repository
salesperson-action-report
Brings together salesperson availability, lead routing, and sales activity in Manager Portal.
Archive location. Dodol/salesperson-action-report. Purpose based on README.md at 29de1ed.
Defining the report
A manager could select a date range and review who received leads, who accepted them, what actions followed, and how much time each salesperson was available. Reza recalls that the team spent substantial time defining those measures and refining the export. The history shows fixes on both sides of the interface. The service revised which events counted as assignments or first actions, while the Portal revised how the resulting figures were displayed and downloaded.
Availability in the Action report
Managers saw Total hours available and Available rate beside lead activity in the Manager Portal Reports suite. The service read each salesperson’s persisted avail_m and routing_m across the selected dates from the App Status Reports table. It summed the available minutes and used the largest accumulated routing total among the tenant’s queried rows to calculate the individual rates. app/lib/appStatus.js at 29de1ed
app/lib/aggregator.js at 29de1ed
Compare the Action grid’s totals with the App Status CSV using the reconstructed day.
Can software read the CSV?
Ordinary rows parse as CSV. The Portal wrote salespersonAction.csv with a header row and a row per salesperson, or per salesperson and project in the project breakdown. I replayed the archived exporter with synthetic data. A strict CSV reader parsed 27 columns in the English example and preserved a comma inside a quoted name. src/app/manager-portal/pages/reports/salesperson-action/salesperson-action.component.ts in Portals/manager-portal at f1324139a
src/app/_shared/services/export-csv.service.ts in Portals/manager-portal at f1324139a
- The headers and values follow the display. The English and Indonesian exports used different headings. Available minutes became values such as
05:22:00, ratios became strings such as59.63%, and missing durations became-. The file identifies the salesperson by display name. An importer would need the date range, stable salesperson IDs, and the export language from elsewhere. - The project context can disappear. The row builder added project and project group, then the export’s column lookup dropped both fields. In a synthetic two-project report, the same salesperson came out as two identical rows with no way to identify their projects from the CSV.
- Embedded quotes can break parsing. The shared writer wrapped each field in quotes and passed embedded quotes through unchanged. A synthetic name containing a double quote made the strict CSV reader reject the file.
The GraphQL response kept stable field keys, salesperson and project IDs, numeric availability minutes, and numeric ratios before the Portal formatted them. Its structured payload would be the better starting point for an automated import. app/lib/aggregator.js at 29de1ed
Development history
-
2019
Define the report and its download
-
Combine routing, lead actions, and availability
Lim Shi Yek’s initial service assembled routing outcomes, lead movements, and app-status figures by salesperson.
e04272f421c2 -
Give the CSV explicit report columns
Najib Rosli replaced the report’s workbook download with a CSV that named and ordered the routing, lead-action, and performance columns.
a6854c5c6 -
Align exported durations and percentages
Najib worked on both the grid and its export. The CSV path formatted first-action and call times and added percent signs to rates.
4fb8f71da
-
-
2020
Refine the metrics and rebuild the exporter
-
Define the average first-action time
Reza Rosli tracked the sum and count of first-action events so totals could divide the accumulated time by the actual number of events.
aebd81f -
Export through the shared CSV service
Mohd Thaqif Bin Abdullah Hasim wired the Action report to the Portal’s shared CSV writer and mapped the flattened rows to translated column labels.
81e1c0ca6c67a7673b
-
-
2021
Resolve conflicting memberships
-
Count a salesperson as active if any membership is active
Reza fixed the roster query for people with mixed active and inactive team memberships on the same project.
fb6657c
-
-
2023
Correct the assignment counter
-
Include automatically assigned leads
Reza added auto-assignment events to the assignment query so the Assigned column included those leads.
29de1ed
-
Primary contributor
Reza Rosli · 76 authored commits
Corrected grouped status reporting for salespeople who belonged to multiple teams.
Example revisions 872b779 (), fb6657c ().
When contributors were active
Authored commits per quarter through Q1 2023, oldest first. Rows are ordered by the first quarter with activity. Brighter cells show more commits. Scroll across to see later quarters.
| Contributor | 2019 Q3 | 2019 Q4 | 2020 Q1 | 2020 Q2 | 2020 Q3 | 2020 Q4 | 2021 Q1 | 2021 Q2 | 2021 Q3 | 2021 Q4 | 2022 Q1 | 2022 Q2 | 2022 Q3 | 2022 Q4 | 2023 Q1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Lim Shi Yek 21 commits · 2019 Q3–2020 Q1 | 15 | 5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Reza Rosli 76 commits · 2019 Q4–2023 Q1 | 0 | 2 | 0 | 21 | 7 | 18 | 0 | 10 | 16 | 0 | 0 | 1 | 0 | 0 | 1 |
| Muhammad Anwaar 1 commit · 2020 Q1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |