Configurable service routing
Custom round-robin assignment for Service Cloud emails arriving from multiple sources.
Problem
Support emails arrive from several sources and need to reach the right people fairly. Out-of-the-box assignment did not cover that mix of sources, so a custom approach was needed.
My contribution
- Built the custom round-robin assignment for Service Cloud emails arriving from multiple sources.
- Built configurable round-robin logic alongside a metadata-based decision engine.
- Delivery timeline: two months of development, 10 days of adoption, and a 15-day stabilization period for rollout issues.
Design
A synthetic reconstruction of the general pattern, not employer code.
- Inbound email with source
- Resolve routing rule from metadata
- Select eligible members
- Pick next member in rotation
- Assign and record position
- Rules (source, group, eligibility) live in configuration so operations can change them without a deployment.
- Rotation position is stored explicitly so assignment stays fair across concurrent arrivals.
Tradeoffs
| Choice | Benefit | Cost |
|---|---|---|
| Rules in metadata | Changes ship without code edits | Needs validation and clear ownership of the configuration |
| Persisted rotation pointer | Predictable, auditable fairness | Concurrency needs care, e.g. record locking |
| Custom Apex over a declarative-only route | Handles multiple sources consistently | More code to test and maintain |
Demonstrated behavior
Planned demo (not yet built)
- Synthetic emails from several sources assigned across a rotating team
- Rule changes taking effect without a deployment
Technologies
- Apex
- Custom Metadata
- Service Cloud
- Email-to-Case