Badge Implementation idea

Zachary Perry asked on January 31, 2017 23:04

So I am thinking about building a custom badge implementation for a site. I want the badges to be activity specific, such as Creating a Community Group, Liking an Article (likes are stored in a custom table), and wanted to get some feedback if anyone had any ideas on the best way to do this.

My original idea was to create it all custom, maybe using scheduled tasks for re-evaluation, utilizing custom events to trigger things. My issue with this approach, is I would most likely have to add code for each badge I created.

my new thought is maybe utilizing roles to determine which badge a user receives, and then somehow using the Macro Rules to set the conditions for users to be added to the roles. Thought maybe using the contact groups, or maybe even Workflow? I really like the idea of using the macro rules to manage conditions for the badges, just not sure which direction to go. (this is also assuming you can create custom macro rules, which I believe is possible)

Any suggestions?

Recent Answers

Trevor Fayas answered on February 1, 2017 15:23

FIrstly, i would get well aquainted with Kentico's Custom Modules, you'll want to use it to store your CLasses (tables) that contain the information, the user interfaces to manage, settings to configure, etc.

Next i would look into the Global Object Events hooks (reference to the hooks), you can detect any activity really through it (any database change will trigger the Object type event hook). From there it depends on what you want to capture, how you want to rank, etc.

Just be sure to follow Kentico's structure, to properly secure your code, use Module "Code" to create API for your classes, properly configure staging tasks if needed, etc. Build it flexible so it can handle different situations.

0 votesVote for this answer Mark as a Correct answer

Anton Grekhovodov answered on February 2, 2017 05:34

Hi Zachary,

I think you can use Macro Rules with Contact groups if you have Kentico EMS license. If user does some activities, he gets some scores. And you can create dynamic Contact groups which based on user scoring (there is a macro Contact.GetScoring or you can create your own). I used this solution (on website with Kentico 8), but only on limited amount of contacts.
Setting up dynamic contact groups
Managing contact scores
Tracking user activities
Improving custom macro performance in scoring and contact groups

If you decide on this solution you should read about contact management database separation. Also, maybe you should disable or remove all unnecesary activities. And in Settings there is an option to remove inactive contacts, you should disable it too.Settings - Inactive contacts

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.