Abstract from the main paper: One standard assumption in workforce management is that the firm can dictate to workers when to show up to work. However, that assumption is challenged in modern business environments, such as those arising in the sharing economy, where workers enjoy various degrees of flexibility, including the right to decide when to work. For example, a ride-sharing service cannot impose on its drivers to be on the road at specific times; similarly, a virtual call-center manager cannot direct her agents to be available for select shifts. When self-scheduling is allowed, the number of workers available in any time period is uncertain. In this chapter, we are concerned with the effective management of service systems where capacity, i.e., the number of available agents, is random. We rely on a queueing-theoretic framework, because customers are time-sensitive and delays are ubiquitous in the services industry, and focus on the performance analysis and control of a queueing system with a random number of servers. In particular, we begin by surveying some theoretical results on the control of queueing systems with uncertainty in parameters (here, the number of servers). Then, we illustrate how to apply those theoretical results to study the problems of staffing and controlling queueing systems with self-scheduling servers and impatient, time-sensitive, customers.