Points Thing Bot in action

Points Thing is a bot on the SNDevs Slack workspace. Users in this workspace are able to offer points to users for helping answer a question, contributing to the community, or any other reason needing positive-reinforcement.

The bot has had around six contributors so far and anyone is encouraged to fork the source repo, intall the app via studio, create a feature branch, commit a change, and then in GitHub submit a pull request to the ServiceNowDevProgram/sn-slack-points-thing master. Collaborative projects are the best projects! Shout out to @j4rodm, @caseybarela, and @andrewjbarnes for keeping the dream alive.

Here are my contributions so far:

  • Created a portal page that will display the top 20 on the points leaderboard (by default)
  • Also allows the user to search for a User ID or User Name to see specific people’s score if they are not in the top 20.
  • Moves the chat.postMessage REST message to a script include so that sending chats to Slack will be easier for future business rules as more features are added.
  • Fix to the business rule that would record when a point was given so that we can start gathering at least three months of data for the next update…
  • Now that we have three months of data, Points Thing bot now says how much points the target has received in the past three months instead of total over all time.
  • It also lets them know if they are the top scorer in the past three months, they get a first place emoji, second place emoji, or third place emoji. Ranks 4 through 10 also get a star emoji.
  • Updated the leaderboard page to account for the new points system. The page now shows the leaderboard for the past thirty days and the leaderboard for all time.
  • Changed the display of “total points” to tiered levels since the inclusion of total points took away the emphasis of the points over the last three months.
  • Adding a few more random messages for the response.
  • Changed the structure of how the random message is generated from a cumbersome switch case to a simple array of messages. This will make adding more messages in the future easier to do.