Call Center Planning

Call-volume and handling-time forecasting with CatBoost, joined with Erlang C queue modeling to determine hourly call-center agent capacity.

A call-volume forecast does not tell a manager how many agents need to be available. Handling time matters too, as does the share of callers who should reach an agent within a target waiting time.

ikas, a Turkish e-commerce platform, needed hourly agent requirements, not just call forecasts. As a freelance consultant I built Call Center Planning end to end: the forecasting models, Erlang C planning engine, APIs, and Tkinter and Streamlit apps; ikas supplied the call-center data. On two held-out weeks, the handling-time model cut MAE 29–49% against copying last week. The engagement (September 2024–December 2025) also covered demand and revenue forecasting. Everything it delivered has been in production since January 2026.

The interactive Call Center Planning staffing walkthrough needs JavaScript.

From two forecasts to one planning table

The call-center service loads a dated pair of CatBoost models: one predicts calls arriving per hour, the other the average handling time (AHT) of answered calls. Both use calendar features; the AHT model also feeds its own predictions back as one-week seasonal lags. The schedule covers weekdays, 09:00 through 17:00.

For each hour, the service returns the forecast call count and handling time alongside the required agents, telephone lines, modeled service level, utilization, and average speed of answer. The forecast and its operational meaning stay in the same row.

Model details

The call-count model uses calendar features only: hour, weekday, day, month, season, and year. The AHT model adds one-week seasonal lags, with its own predictions fed back recursively for hours not yet observed; its bundle stores the last observed values for those lags. The two forecasts are joined on timestamp; only matching hours go into the staffing calculation.

Forecast evaluation

Each test week (Monday–Friday, 09:00–17:00 inclusive, 45 hours) is forecast in one run from Monday 09:00 by the model set dated that Monday. That set was trained on three years of call-center history, from 2022 to the previous Friday (April 11 and August 15). No test-week actuals are fed back. ikas had no forecasting model before, so the baseline copies the same hour last week. CatBoost beats it widely on handling time and August volume, and ties on April volume (−4%).

Test weekTargetCatBoost MAELast-week baseline MAEMAE changeMAPE: CatBoost / baseline
Apr 14–18, 2025Calls / hour5.846.11−4.4%18.4% / 19.1%
Apr 14–18, 2025Handling time (AHT)50.2 s98.6 s−49.1%12.2% / 24.9%
Aug 18–22, 2025Calls / hour5.409.18−41.2%18.8% / 33.8%
Aug 18–22, 2025Handling time (AHT)53.7 s76.2 s−29.5%12.6% / 18.9%

MAE and MAPE average absolute and absolute percentage errors over the same 45 hours per week. Neither target has zeros in either test week. On daily totals, call-count MAPE is 2–3%; on daily average handling time, AHT MAPE is 9%. Neither week was used for model selection or tuning. These are two short weeks, scored from the saved model bundles, not a continuous production backtest.

Staffing against a service-level target

The starting workload is calls per hour × handling time / 3,600, measured in erlangs. That is the average number of calls in progress. With exactly that many agents, the modeled queue grows without limit; Erlang C needs more agents than erlangs.

Erlang C estimates the probability that an arriving caller finds every agent busy and has to wait. The staffing solver increases the agent count until its modeled fraction of calls answered within the requested time meets the service-level target, with utilization below full capacity.

The API defaults to 85% answered within 15 seconds; both values are configurable. These are calculation settings, not a measured service-level result. A separate threshold (default 30 s) yields the modeled share of callers waiting longer than that, which the API labels abandonment; it does not set the staffing target or impose a hard maximum on waiting.

Telephone lines carry calls in talk and in queue; Erlang B sizes them so fewer than 1 in 1,000 calls find every line busy. The library also includes extended Erlang B for immediate retries. The agent-sizing path uses Erlang C, rather than treating blocked calls and queued calls as the same problem.

Interfaces

A FastAPI service exposes both paths: POST /erlang sizes staffing for call volumes and handling times a planner supplies, and POST /calculate returns a dated model’s forecasts with staffing attached. Both take the service-level target and waiting thresholds as parameters, so scenarios can be compared without duplicating the queueing math in a user interface.

A Tkinter desktop app lets ikas’s call-center team train and run the models without writing code, and a Streamlit dashboard presents the deployed models and their forecasts.

A second FastAPI service serves weekly revenue forecasts and product-demand forecasts for three product lines, from TensorFlow SimpleRNN models run recursively.

Delivered scope and limits

The work turned a predicted workload into an explicit staffing requirement under chosen service-level settings. The output is net simultaneous capacity, not a shift roster, and point forecasts pass into staffing with no uncertainty buffer.

What the staffing model does not cover
  • No shrinkage or occupancy cap, and no scheduling of breaks, leave, or skill-based routing.
  • Erlang C assumes a stable queue with independent arrivals and a simplified handling-time distribution. The output labeled abandonment is Erlang C’s probability of waiting longer than the threshold, not an Erlang A patience model or observed caller behavior.
  • The schedule is not 24/7, and longer recursive AHT forecasts inherit uncertainty from earlier predictions. Forecasts that start after a bundle’s last saved hour reuse that lag history without re-forecasting the skipped hours.
  • Client records, model artifacts, and operational data are not published.

What I took from it

  • Forecast error and queue performance are different problems. Calls peak from 12:00 to 16:00. At 39 calls an hour and a 414 s handling time, typical of that window in the April test week, the engine staffs 8 agents. A forecast 6 calls short, about one hourly MAE, staffs 7, and the real calls then get 80% answered within 15 s against the 85% target. That is an illustration, not an observed incident.
  • Keep the claims separate. Forecast error, modeled staffing, and observed service levels each need their own evidence; the first does not prove the other two.
  • Copying last week is the bar. It was close to CatBoost on April call volume, so a model has to earn its place target by target.
Status
Deployed
Role
Freelance ML Consultant
Stack
Python, FastAPI, CatBoost, TensorFlow, Polars, Pydantic, Tkinter, Streamlit
Written up
, updated