# Customer Support Workforce Routing

[Grab](https://yomu.fyi/company/grab) · Suman Anand · Feb 5, 2021

**Type:** Problem & solution

## Summary

Grab replaced its third-party customer support routing software with an in-house workforce routing system for Livechat to gain better priority controls, bespoke configurations, and deeper analytics. The platform separates requests into distinct priority and business queues, using parallel workers that spend varied time slices dequeuing higher-priority issues like safety concerns. To prevent request starvation, workers operate out of sync across queue priority levels while dynamic queue limits cap incoming volume based on agent availability and performance. The system routes requests through an intermediate Agent Group layer, calculating eligibility scores from proficiency and concurrency metrics while managing per-agent locks to prevent over-allocation.

## Context

Grab's third-party customer support solution lacked request queue prioritization, offered limited agent-state analytics, and caused long lead times for bespoke routing customizations and bulk configuration changes.

## Approach / What changed

Grab built a custom workforce routing engine using multi-tier priority queues, out-of-sync parallel dequeue workers with time slicing, dynamic queue limits, an intermediate agent grouping architecture, and distributed locks for agent concurrency management.

## Takeaways

- Workers prevent low-priority request starvation by cycling through priority queues out of sync across concurrent instances.
- Agent assignment evaluates an eligibility score factoring in proficiency, online status, current concurrency, max concurrency, and last allocation time.
- Transferred or unaccepted chats are placed into dedicated high-priority reallocation queues to minimize secondary wait times.

**Tags:** [Architecture](https://yomu.fyi/topic/architecture), [Go](https://yomu.fyi/topic/go), [Reliability](https://yomu.fyi/topic/reliability), [Scalability](https://yomu.fyi/topic/scalability)

[Read original post](https://engineering.grab.com/customer-support-workforce-routing)
