CSM Assignment Engine
A dynamic workload optimization engine that routes accounts based on a Constrained Greedy Heuristic, balancing representative capacity, account complexity, and strategic risk.
The Problem
Hidden complexity creates false balance
Naive assignment models treat a $50K single-product account and a $500K five-product account identically — overloading reps with lower headcount but higher complexity.
Assigning SaaS accounts based purely on "current account count" creates a hidden imbalance. A $50K single-product account and a $500K five-product account require vastly different operational lift, yet naive assignment models treat them identically. As a result, reps with a lower absolute headcount are frequently the most overloaded due to hidden account complexity. Building a pure mathematical solver (like Linear Programming) to fix this is too resource-heavy and will consistently time out within Google Apps Script's execution limits.
The Solution
Constrained Greedy Heuristic
This system trades academic perfection for operational reality. It separates the pure mathematical scoring from the human-in-the-loop workflow, ensuring automation enhances — rather than overrides — management strategy. The engine uses a custom greedy assignment loop where accounts are pre-sorted by complexity (descending), and capacity is re-calculated dynamically after every single assignment.
Scoring Matrix
Four-dimensional capacity evaluation
Volume (35%)
Proximity to total account headcount ceilings. Prevents overloading reps who are already at capacity.
ARR (25%)
Proximity to financial portfolio caps. Anchored strictly to Annual Recurring Revenue, ignoring TCV to avoid inflating multi-year deal workload.
Renewal Balance (25%)
Smoothing out quarterly renewal distributions so reps aren't buried in a single quarter. Prevents seasonal overload spikes.
Portfolio Risk (15%)
The current proportion of at-risk accounts, ensuring reps with struggling books aren't handed more turbulence.
Design Patterns
Human-in-the-loop guardrails
The Bouncer Pattern
Automation handles the bulk, but human intuition handles the exceptions. If the system detects a high-value "Enterprise Alert" account (top-tier segments under ~300 total accounts), the assignment loop halts. The engine intentionally blocks direct automation for these targets, alerting leadership that a white-glove, manual match is required based on executive alignment and historical relationships.
ARR vs. TCV Anchoring
Capacity limits are anchored strictly to ARR, ignoring TCV. A 3-year deal at $100k ARR evaluated as $300k TCV instantly eats up rep capacity. When renewed for a standard 1-year term, the math incorrectly registers a massive retention penalty. Anchoring to ARR keeps workload grounded in present-day reality.
The New Hire Magnet
Ramping reps need repetitions, not complex math. The engine applies a flat volume boost (Score = 85) to new hires. Protected by the Bouncer preventing them from taking Enterprise accounts, this logic turns new reps into magnets for standard accounts until they hit their targeted ramp capacity.
How It Works
Pull → Score → Stage → Balance
Pull live data
Google Apps Script pulls live ARR, product subscriptions, renewal dates, and health metrics from Totango and Salesforce APIs into the working dataset.
Score CSM portfolios
The ScoringEngine evaluates current CSM portfolios against the four-dimension matrix. A single-product $50K account and a five-product $500K account are no longer treated as equal weight.
Stage assignments
The AssignmentWorkflow ranks eligible CSMs, stages the highest-scoring candidate, and allows for manual manager override before committing. The Bouncer halts automation for Enterprise accounts.
Dynamic balance
Upon commit, capacity is re-calculated dynamically. The next account is assigned to the CSM with the most remaining capacity. Results are logged for audit and rebalancing.
Visual Architecture
Complexity scoring and greedy assignment
Results
Operational impact
1,200+
Accounts assigned dynamically
4D
Scoring matrix (Volume, ARR, Renewal, Risk)
0
Manual spreadsheet passes required post-deployment
Connected Systems
Design Patterns
Source Code
The full implementation is available as a sanitized reference repository. It includes the Google Apps Script engine, Python data prep scripts, configuration schemas, and architecture documentation.
View on GitHubMethodology Phases