Facebook’s vending machines: A Coke or a keyboard?

Machines that “vend” power cords and other electronics transform IT at the social-networking company.

Credit: Facebook

FORTUNE — Most employees wouldn’t describe their IT department as “awesome.” But Facebook CIO Tim Campos is hoping a series of custom-made vending machines that dispense computer accessories instead of snacks and sodas will help change that perception.

The vending machines are Campos’ latest and quirkiest undertaking. (Previous projects include setting up Genius Bar-like IT help desks—a la Apple (AAPL)—throughout Facebook headquarters.)

While getting power cords and replacement keyboards to employees who need them sounds easy enough, at many companies the process requires filling out order forms that can take IT departments days to fulfill. Campos decided to take a more user-friendly approach to this common problem. His original idea was putting computer accessories into cabinets that employees could freely access. To keep track of who was taking what, he installed small digital kiosks next to each cabinet and asked employees to swipe their badge and mark which accessory they took.

“It didn’t work very well,” Campos admits. “We found that only about 5% of the time did people bother to tell the kiosk that they took an accessory.”

The “aha moment” came from his assistant, who came across an iPod-dispensing vending machine in an airport.

Campos green-lighted the project and his team began working with a manufacturer to custom make machines that could dispense computer accessories for Facebook employees.

Just six weeks later, in June, the bulky, rectangular machines arrived at the social networking company’s Palo Alto, Calif. headquarters. So now, when Facebook engineers spill coffee on their keyboard (a common mishap) they head to a nearby vending machine instead of hitting up their IT guy or just grabbing a replacement from a nearby cabinet. They swipe their badge, key in their selection and voila—a brand new keyboard drops down for them to take.

Of course, there is a business benefit to the vending machines. According to Campos, they’ve reduced the cost of managing replacement accessories by about 35%. While products found in the vending machines are free, items are clearly marked with price tags so employees can see the retail value of each accessory they take. The new vending machines also require all employees to swipe their badge before making a selection. That means each and every power cord, keyboard and screen wipe they take can be traced back to their name, ensuring that the system won’t be abused (at least not as much as the previous cabinet system was).

Campos is a strong proponent of employee accountability. He’s taken the same approach to managing mobile usage, which he says is one of the top three internal expenses his department oversees. Each new hire that comes through the door is given the same choice—iPhone or Android device. Facebook picks up the monthly voice and data tab, but employees receive a copy of their bill each month so they can personally keep track of their usage patterns and corresponding cost to the company (they can even see how they rank relative to their department’s averages). To track these costs and provide employees with the necessary data, Campos uses a service from a company called Apptio. Like the vending machines, that’s helped Facebook cut costs incurred by employees. Of course, it’s also led to several managers calling out workers with expensive roaming habits, though Campos says it’s all been done in the spirit of positivity.

“It’s not been perceived as something where the IT organization is coming down on employees,” says Campos. “We’re just sharing your cost and you get to do what the right thing is.”

Sharing monthly phone bills with employees in order to cut costs may not sound “awesome.” But getting free—albeit trackable—computer gear from a vending machine is kind of cool (at the very least, it beats putting in an order and waiting for IT to respond).

Three machines are already installed and Campos says if all goes well Facebook’s new headquarters in Menlo Park will soon be decked out with two vending machines per floor. And future machines could also dispense higher-value items like phones and PCs.

“Now 100% of employees have to badge in, and there’s better accountability on what people are taking,” says Campos. “More importantly, it’s just cool. Employees love to see these machines.”

[cnnmoney-video vid=/video/technology/2011/07/05/tt_facebook_vending_machine.fortune]

Subscribe to Well Adjusted, our newsletter full of simple strategies to work smarter and live better, from the Fortune Well team. Sign up today.