As Iain mentioned in an earlier post, we’ve been busy building a gamification engine on the Salesforce platform for a client.
In this post I dig a little deeper into how the engine works.
Having gathered requirements from the client, we first considered off-the-shelf gamification apps. Looking at what was already available gave us some great additional ideas – but also confirmed that we needed to create a bespoke solution.
As we designed the bespoke app, we kept a few key elements in mind:
- It had to be flexible: our client’s business embraces change, so the gamification engine had to as well. It should be easy for an admin to modify the rules that award points and badges.
- It had to deliver in real time: users want instant gratification, so they need immediate notification when they’re awarded new points and badges.
- It had to be fun and sexy: users expect slick, engaging experiences. In order to successfully drive the end business goal – increased collaboration and productivity – the system has to make users love using it.
How the engine works
The first step is stakeholders deciding which activities they’d like to gamify.
Then an admin user accesses the Gamification Admin Console, and defines the specific actions that will be gamified – for example, “Lead Creation” or “Contact Phone Updates”. The admin then allocates points, based on specific activities and different users’ roles.
The next step is badge and trophy creation: uploading icons for each new badge and trophy, and defining achievement rules and weightings for each group of users.
The rule definition is fairly simple. Using common operators like AND, OR, NOT, SUM, the admin creates functions that include actions and weighting that users must fulfil in order to win an award.
For example: in order to achieve the “Lead-Gen Leader” badge, a user has to create 50 leads and update all the phone numbers for the leads. To set this up the admin would define the rules as:
AND(50″Lead Creation”, 50″Contact Lead Phone Update”).
To keep the evaluation process simple, the functions are compiled into an easy-to-process tree dataset. Using the Composite Pattern, whenever a new badge is created, the dataset is loaded and the evaluation is carried out invoking the same interface on different nodes, whose implementation depends on node types: AND, OR, NOT, SUM, etc.
Keeping users engaged: What they see
Each user has a “Social User Profile”, which acts as their gamification and achievements dashboard. Here they can see which badges and trophies they’ve achieved, future goals, points, trends and their activity timeline.
To simplify navigation and tap into users’ competitive spirit, we created a number of widgets, like friends and rivals.
If you’re interested in finding out more about Tquila’s approach to gamification, please get in touch! We’ll follow up with a code-centric post soon, which will give you more insight into the structure of our system and design decisions we’ve made.