Round Robin: Rotating Responsibilities Responsibly

Kevin Bruccoleri
In the weeds
Published in
9 min readMar 27, 2020
Round Robin Logo (courtesy of Becca Kroll)

Here at Greenhouse, we recognize the value of distributing various team responsibilities amongst all of its members. For example, no single person should be stuck moderating, facilitating, or scribing a particular meeting.

Most teams within the R&D department have support rotations where one person from a given team is available during work hours to help triage technical issues that bubble up from tech support or perform one-off migrations and tasks for customers.

We had some problems with our existing solutions, so I made Round Robin, a Slack bot that helps teams manage their rotations and meetings.

Existing Solutions

Each of these teams has the autonomy to decide how they want to facilitate meetings or track their rotations. Most solutions have been a variant of two tools.

PagerDuty

We have an existing integration that pulls the roster from PagerDuty and updates a given Slack channel’s topic to indicate who is currently on call. The functionality is great, but its use case is limited to just the one rotation — not every team member is in PagerDuty, only people that are trained for the support rotation. This prevents the tool from being the sole rotation manager for most teams.

Google Sheets

A lot of teams do it the old fashioned way; writing out the rotations in a spreadsheet.

Adding new lineups and updating old ones can be a nuisance with a spreadsheet

The process requires a lot of manual upkeep; team members have to routinely check the spreadsheet to find information and make sure that everything is up to date. In my team’s case, we had three rotations at the time that ran at different cadences. The result is a messy, confusing spreadsheet that is hard to read.

The spreadsheet method can allow for a flexible schedule, like when someone is out of the office. However, it is really difficult to add and remove users from a given rotation, as it requires a lot of shifting around.

First attempt

My team (Foundation Data, aka “Team Fanta”) already had a spreadsheet set up to solve this problem. So why not just have the Google Sheet communicate the information back to Slack?

Google Scripts are a free, convenient way to make data in a Google Sheet accessible on the web. The script can be be “deployed” to a URL that Slack can then query. And so, FantaBot was born.

Unfortunately, Google Scripts can be hard to build. There is a bit of a learning curve when it comes to the Google Sheets API and its browser IDE. On top of that, it can be near impossible to debug; you can’t utilize breakpoints, configuring the logging system is difficult and confusing, and you can’t track what requests your Google Script has received.

Once I got FantaBot working, it became apparent that the use cases were limited. The bot was built specifically for just one Engineering team. And even with respect to our team, those needs weren’t well met.

People leave teams, people join teams, people get ramped up for prod support. Rotations can change frequently, but a spreadsheet isn’t really built for all those changes. Each rotation required its own space in the spreadsheet and had to be specifically coded into the script.

In this state, the bot only pulled data from the spreadsheet when requested. Users had to use a slash command to fire off a request to the Google Script. Slash commands can only be executed by real Slack users, so there was no way to use Slack reminders to automate the process.

FantaBot had one job…

What does success look like?

Before building any kind of software, it’s important to have a clear idea of what it should do, a somewhat clear idea of how it should do it, and a vague idea of what success would look like.

FantaBot solved only part of the problem in its initial form and did so in a way that was inflexible and hard to maintain. So, I decided to step back and map out more concrete specifications of the ideal solution.

Slack Integration

Just like the first attempt, this new tool should integrate with Slack. Slack is our hub of communication, one of the most reliable places to find up-to-date information. The solution would be its own source of truth, sending its data into Slack for visibility.

Easy to configure and update

Any team should be able to create as many rotations as they need. One of the pain points from the Google Script solution was the complexity of adjusting the lineup. The new tool should make it simple to add and remove people from rotations.

Automatic rotations

Rotations don’t happen randomly. The solution should provide some way for users to communicate when rotations should cycle.

One of the best examples of an intuitive scheduling system already exists within Slack — its reminders system. By listening for specific messages that would tell it to rotate a particular lineup, the tool could leverage automated messages from the Slack reminders.

Another option would be to handle the scheduling internally. If the system was aware of the cadence of a given rotation, there would be more possible functionalities down the line. The tool could provide show date ranges on schedules or tell a particular user when they will be in charge of the rotation next.

How does Round Robin work?

Usage

Creating and configuring a rotation in a Slack channel is easy! Give it a name and add the rotation’s lineup (which can be done in bulk), then you’re set. You can manually rotate it if you wish, or you can schedule it to rotate automatically.

On top of that, you can give one rotation per channel control over the Slack channel’s topic. When it comes time to rotate, the bot will mention who is up next, update the topic, and send the user to the back of the lineup.

How does Slack communicate with the bot?

Slash commands allow users to trigger apps from the convenience of their message box. When a user types a command like /remind , Slack fires off a request to the command’s associated URL.

Slack sends a bunch of data within that request, including the user that called the slash command, the message contents, and the channel in which the message happened.

Setting up the Slash command for /rotation

Users can speak to the Round Robin app by using the /rotation Slash command.

PRO TIP: Try pointing your Slash command to a local app hosted by ngrok to make development quick and easy.

How does the Round Robin know what to do?

When the bot gets the message, it comes in the form of a single string. The end goal is to take that string and split it into the appropriate parts.

What is the rotation name? What users are we acting upon? When are we scheduling something?

Depending on what the user is trying to do, the parts can be different. Some parts are not always given, and the parts aren’t always in the same positions.

Round Robin uses the concept of a subcommand, which is the first word following the slash command. We can use it to give us some context to what the user is requesting.

Sample removal command, parsed into parts

In the remove command, we know the first part will be a list of users. Once we hit the word from, we expect a rotation name to follow.

Sample schedule command, parsed into parts

In the schedule command, we expect the first part to be the rotation name. We depend on the word every to indicate the end of the rotation name and cadence of the rotation.

Because we aren’t splitting word by word and checking for positions, the commands are more flexible and readable. Rotation names can be made up of multiple words, and date parsing can be more flexible.

How does scheduling work?

In the current system, there are two ways to schedule.

Fixed Interval

The first way uses a fixed interval, or, the same amount of time since the last cycle of the rotation. This use case is most common, for running something on a weekly or bi-weekly basis. This approach would be used when you wanted to schedule a rotation to cycle every Monday at 10 AM.

To accomplish this, we track three things:

  1. the time of the first rotation cycle (if it has not rotated yet)
  2. the time of the last rotation cycle
  3. the amount of time in between.

We don’t need to individually track the day or time of the command since we can infer it from the last cycle.

Monthly Anchor

The second way uses a monthly anchor. For example, we can set a given rotation to cycle every 3rd Friday. We still track the time of the first and last cycles, as well as which week we want the rotation cycle to happen.

3 Tips & Tricks to Launching a Slack bot that THEY don’t want you to know about

Small Beta

You can count on one hand how many people are in this beta.

Having a small beta can validate that your bot is useful without getting an overload of feedback.

In the case of Round Robin, the first beta took place in our team’s public Slack channel. Our team makes up the most active group in that Slack channel, but other stakeholders noticed the bot’s usage and began wondering if their team could benefit from it too.

Feedback channel

“pLEaSe leAvE aNy FeEdBACk yOu Have iN tHiS ChAnnEL!”

Once your bot starts getting actual usage, all the bugs will start to come out of the woodwork. When people find them, they will be certain to let you know, which is exactly what you want.

However, this stream of feedback will likely come in the form of direct messages to you, which isn’t as helpful. It is quite possible that more than one person will find any given bug, which means that you are going to receive duplicate reports. It also means that any context you give 1-on-1 will not transfer to any of the other users.

Having a dedicated channel is great because it keeps all the information organized in one spot. You won’t lose track of any feature requests and other consumers will be kept in the loop about bugs.

Just launch it!

Pictured above: A ready-to-launch Slack bot

The best way to beta test your Slack bot is to get people using it. You could spend a lot of time perfecting it and building out a test suite, but there is also the sad possibility that you are the sole member of your user-base.

Slack bots can help

Slack bots can be a fun, easy way to automate workflows and make your teams run more smoothly. If you do decide to build one, make sure to map out the specifications first to avoid hitting a dead-end. At the same time, try not to fall too deep into a rabbit hole and remember to launch it so people can start using it!

Growing @ Greenhouse

Growth is a huge part of the culture at Greenhouse. L&D is not only encouraged, but also heavily supported. Round Robin was a great opportunity for me to learn more about how Slack bots work and how they can help teams function better. Currently, the bot is managing rotations for 8 R&D teams and counting, and even catching on in other departments!

--

--