Awarding Gather badges

Return to top

13 Comments

  • Shivani Bhatt

    Hi @... , I've enabled the badges and my theme is updated, I still don't see the badges. Pls help.

    0
  • Kasper Sørensen
    Zendesk Product Manager

    Hi @...

    Maybe you can try with the latest Copenhagen theme to verify whether it is a problem with your theme or with setting up badges in Guide Admin?

    0
  • Maggie St.Clair

    We have a theme that is created by Lotus Themes. I have been working with them to get the code in so that we can award badges. I have award two badges to one of my customers that is a moderator. I am trying to verify that all of the code was updated properly. Should the badges show up on their posts/comments that were created in the past or do I need to wait for him to add a new post or comment now that I have awarded a badge? I am not seeing it on their old posts so trying to determine if there is an actual issue or not. If any other users have some insight I would greatly appreciate it.  

    0
  • Kasper Sørensen
    Zendesk Product Manager

    Hi @...

    This sounds like an shortcoming of the theme then. If the user has been awarded badges, and they are not appearing, that's then because the theme is built to not show them.

    0
  • Maggie St.Clair

    Thanks, Kasper. I will reach back out to Lotus Themes. 

    0
  • Maggie St.Clair

    @..., so I just went back in to grab some screenshots and now I do see the one title badge shows but only for the original post and not for the comment. Does it require different coding to show for comments as compared to posts? I removed my customers last names from the screen shot but I can promise you that the Ryan user is the same person with the same log in. As you can see he has the badge for his original post, but it is missing when he later comments again. Do you still think this is an issue with the theme or that something isn't loading properly?

    0
  • Kasper Sørensen
    Zendesk Product Manager

    Hi @..., yes the theme developers can decide how much or how little to include badges. From the theme developer's point of view it is a piece of user information, like the avatar or the user's name, which they can decide to include or not.

    For comparison, you could try installing a clean Copenhagen theme (on a test account / sandbox if you don't want to disrupt your live theme) and compare with that.

    0
  • Maggie St.Clair

    Thanks for the recommendation to add the Copenhagen theme. I did that and now see what the badges should look like. Now I can better explain it to the theme developers so they can fix it. Appreciate the quick responses and assistance, @....  

    0
  • Brianne Reinhardt

    I want to use the API to automate some badge assignments based on some facts about a user's community stats. I have some javascript working in a test theme, but if I were to make this live my API token would be exposed. Does the Zendesk team have any recommendations for utilizing the API right from within Help Center theme without exposing the token for POST requests?

    0
  • Eric Nelson
    Zendesk Developer Support Team

    Hey Brianne,

    Unfortunately we don't as we recommend not using your admin api token within your help center codebase. Would you be able to give me more information on the community stats you're basing this off of? We may be able to come up with a solution that doesn't need to live within your help center.

    Have a wonderful day!

    Eric Nelson | Manager - Developer Advocacy

    0
  • Brianne Reinhardt

    Hi @...!

    Yeah, I absolutely don't want to use my token within the codebase. Community Stats: We have 4 badges related to post count, 3 badges related to comment count, 4 badges related to subscription type/count, and 2 badges related to vote type/count.

    For example, for posts: Whenever a user submits the post form (without errors), we GET the user's post count and compare it to some pre-determined criteria (1st post, 5th post, etc.), and if they meet that criteria we POST the badge assignment for that user. Right now it's pretty simple, but in the future we may want to also delete badge assignments as users "level-up."

    Comments, subscriptions, votes work similarly with different triggers and criteria obviously.
    The GET can be done without a token since end users have access to their own stats, but the POST can only be done by an admin obviously.

    Thanks for your help!

    0
  • Brianne Reinhardt

    @... Hey Eric, just following up on the above.

    0
  • Eric Nelson
    Zendesk Developer Support Team

    Hey Brianne,

    Apologies for not seeing your previous message! The best way I can think to handle this would be for you to pass the request to an external service which then does the POST request. For example:

    After the post count has been compared and the criteria met. You pass the user id via an ajax request to a small node.js server which ingests it and handles the POST request to award the badge. This has its own downsides, but would allow for you to keep your api token secure.

    Hope this helps,

    Have a wonderful day!

    Eric Nelson | Manager - Developer Advocacy

    0

Please sign in to leave a comment.

Powered by Zendesk