Forum Discussion

micha80's avatar
micha80
Expert
10 years ago

Badge for votes in idea area

Hi all,

 

we want to integrate the badge system in our community. Two of the defined badges depending on votes given / received in idea boards. What is the best way to make this possible? I was thinking about a role depending badge but don't know how to detect wether a user has voted for an idea or not.

 

Thanks for help!

Michael

6 Replies

  • micha80's avatar
    micha80
    Expert
    10 years ago

    Hi grazitti,

     

    thanks for your reply! Do you know the "best" API call when I already know the user?

     

    Regards,

    Michael

  • OlivierS's avatar
    OlivierS
    Lithium Alumni (Retired)
    10 years ago

    micha80 

     

    If you manage to find a metric matching your criteria, when creating your badge, go to advance and enter something like the below for your rule:

     

    metric.net_accepted_solutions >=1

     

    The example provided is to give a badge for the first accepted solution.

     

    When the user reach the condition (or has already reached it), he will get the badge.

  • micha80's avatar
    micha80
    Expert
    10 years ago

    Hi Olivier,

     

    thank you for your reply, too! I had a look into the metrics but could not find any value which says something about "Votes in idea area". So I think the metrics are no solution for this, right?

     

    Regards,

    Michael

  • micha80's avatar
    micha80
    Expert
    10 years ago

    Hi together,

     

    for now I am going this way:

     

    1. I have created a macro which reads all kudos for a given user id  (API V2 - Kudos ressource) 

    2. I iterate them and check wether the message is in the idea board or not (messages/id/[message_id]/board/id)

    3. Depending on count of votes I set a new role to the user

    4. The new role will be used as a condition in the badge rules

     

    After all I will contact premium support to ask for a scheduled task which calls an endpoint and iterates through users (criterias needs to be defined individually to not iterate through all users) and call the macro for each of them.

     

     

    Is this a good way to go or are there any hints on this?

     

    Regards,

    Michael

  • OlivierS's avatar
    OlivierS
    Lithium Alumni (Retired)
    10 years ago

    micha80 

     

    I think you should have a step '0' where you get all the users that don't have the role defined in step 3.

     

    Now, having said that, I'm not sure this would work at scale ; depending on how many users and messages you have and the frequency of the scheduler.


    And the scheduler is something that would need feasibility/sizing via Lithium professional services as a paid engagement.

     

    If the requirement isn't urgent, I would highly advise to create an enhancement in the idea exchange.