Visualizing Salesforce Data… in Minecraft!?

Taking a break after Dreamforce 2013, it occurred to me that I could create a Minecraft mod to visualize business data in 3D. Discover how 'Forcecraft' represents Salesforce Accounts by buildings, and maps Opportunity Stage changes to in-game events. It's a proof-of-concept for visualizing your Salesforce data. You can immediately see which Account has the most Opportunities, and dig deeper into the data in a very interactive way. It's also a great demonstration of the richness of the Force.com APIs - you really can access every byte of your Salesforce data, and metadata, via the APIs and manipulate it in any app you choose.

If you have children between the ages of 9 and 19, it’s increasingly likely that you’re familiar with Minecraft; if not, you can think of it as a kind of virtual Lego, an open-ended, blocky, sandbox where you can build, battle, and even farm. Minecraft is a gaming phenomenon, and part of its appeal is the opportunity to modify (‘mod’) the game, adding new materials, monsters, and even quantum physics to the ‘vanilla’ game.

Taking a break after Dreamforce 2013, it occurred to me that I could create a Minecraft mod to visualize business data in 3D, modeled on Neuromancer‘s cyberspace. Each Salesforce Account would be represented by a building, with rooms within each building representing Opportunities. Contacts would roam the space, interacting with you in response to events in the Salesforce environment. Close an Opportunity, and a Contact would find you and give you precious metals and gems.

A few days’ coding later, Forcecraft was born!

As you can see in the screenshots and video, this initial version implements the basic vision – you can explore Accounts, wandering between the rooms that represent Opportunities, seeing Opportunity status at a glance via signs and levers.

On startup, Forcecraft uses the Force.com REST API to retrieve Accounts, Opportunities and Contacts, generating buildings and creating Contact entities as the player explores the Forcecraft dimension. The connection is read-write – throw the lever for a different Stage and you’ll see that the Opportunity was updated in Salesforce (do NOT run this on a production org!). The mod also uses the Force.com Streaming API to receive notifications on data changes within the Salesforce environment; not only does changing an Opportunity’s Stage in Salesforce result in the lever position being updated ‘in game’, if the Opportunity’s Stage changes to ‘Closed Won’, a Contact from the relevant Account will appear before you and drop items (gold, diamonds etc) representing the Opportunity Amount. UPDATE: If the Opportunity’s Stage changes to ‘Closed Lost’, the weather changes to thunder and rain for a minute.

Take a look at Forcecraft in action:

But, why even build this? Firstly, it’s a proof-of-concept for visualizing your Salesforce data. You can immediately see which Account has the most Opportunities, and dig deeper into the data in a very interactive way. It’s also a great demonstration of the richness of the Force.com APIs – you really can access every byte of your Salesforce data, and metadata, via the APIs and manipulate it in any app you choose. Finally, well, it was a lot of fun; I’ve spent some quality time with my boys combining their knowledge of the Minecraft world with my Force.com API skills to create possibly the most unlikely mashup you’ll see this year!

I have some ideas for extending Forcecraft, such as adding integration with Chatter so I can view and post to the Chatter feed for an Account, but I’m really interested in your ideas – leave a comment below. And, if you’re a Java developer looking for a fun side project, I’m very open to pull requests. Fork the Forcecraft project on GitHub and get hacking!

Published
January 6, 2014

Leave your comments...

Visualizing Salesforce Data… in Minecraft!?