Repository
CarouselMatcher
Matches incoming leads with eligible salespeople.
Archive location. Dodol/CarouselMatcher. Purpose based on README.md at 6a3368f.
What the history shows
The matcher checks project and team membership, availability, and the cooldown after a previous acceptance. It considers eligible people in routing-attempt and availability order and gives each a weighted chance. The routing simulation illustrates the underlying selection policy.
Exceptions to the weighted draw
- Direct assignment to a sole salesperson. With the single-candidate option enabled, pre-routing assigns the lead directly if the designated valid team has exactly one salesperson. For leads without a valid team, it checks the project roster. The assignment is recorded as
soloSP. - Keep related leads with the same salesperson. With preferential assignment enabled for the project, pre-routing can reuse a salesperson matched to a related lead in the current batch or a related lead’s existing assignee. The salesperson must belong to the current project and be absent from the lead’s ignore list. The assignment is recorded as
SSPA. - Offer immediately to the last eligible candidate. With the single-candidate option enabled, automatic routing skips the weighted draw when exactly one eligible candidate remains after validation. That candidate gets an offer. The sole-salesperson rule above operates on roster size and assigns directly.
See Dodol/CarouselMatcher, app/lib/Matcher.js at 6a3368f.
A team of one already has a destination for its leads. Waiting for that person to come online would only delay assignment. Reza’s 14 March 2022 commit 5dfe3a9 adds the direct assignment branch.
View the CarouselMatcher console output alongside the original simulator.
Development history
-
2019
Start a dedicated lead matcher
-
Match leads for mobile dispatch
Muhammad Anwaar added the first matcher implementation. Its README describes matching a lead with a salesperson and handing the result to Presence for mobile dispatch.
c9594d1
-
-
2020–21
Move legacy queues and persist deferred leads
-
2022–23
Keep team assignments eligible during automatic routing
-
Avoid skipping later leads assigned to a team
Reza narrowed the worker’s skip rule so that a lead with no available match would no longer cause later team-assigned leads in the same project to be excluded.
b630225 -
Document the eligibility and ordering rules
The matcher at this revision records how routing attempts, availability, solo assignment, and preferential assignment affect selection.
6a3368f
-
Contributors
-
Reza Rosli
Primary contributor · 447 authored commits
Persisted deferred leads in Redis and kept later team-assigned leads eligible during automatic routing.
-
Muhammad Anwaar
23 authored commits
Added the first matcher implementation and documented its handoff to Presence for mobile dispatch.
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 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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Reza Rosli 447 commits · 2019 Q4–2023 Q1 | 14 | 182 | 21 | 46 | 35 | 12 | 21 | 46 | 39 | 29 | 0 | 0 | 1 | 1 |
| Muhammad Anwaar 23 commits · 2019 Q4–2020 Q1 | 18 | 5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |