Hercules Slack Wrapper - Update to use CSP libraries

Key Information

The challenge is finished.

Challenge Overview

Hercules uses Slack internally for communication between teams.  We also have built a large Node library that integrates with internal Hercules services.  A previous challenge has started work on some basic account management with the bots and the base libraries.  This challenge will update the calls to Einstein and PSG to use the CSP library instead, and will do some refactoring


For this app, we'd like to use Botkit:


For this challenge, we will just be targeting Slack and Slack Buttons.  The Botkit repo contains examples for both.


The current codebase is all one big class (index.js).  I'd like to split this into pieces so the code is easier to manage:

* One file for the Botkit controller functions
* One file for searching functionality
* One file for billing functionality
* One file for device functionality.

Base libraries

Going forward, the base libraries should be loaded via a git submodule, not packaged with the codebase.  A sample submodule path will be provided in the forum, and the baselibs folder should be removed from the app.


CSP is a new service added to the Node base libraries.  It contains lots of functionality for:

* Searching
* Billing functionality

We are going to replace any uses of Einstein and PSG with the CSP calls in the base library.  The calls should be fairly self-explanatory, but feel free to ask questions if needed. 

We want to make sure search works by:

* Email
* First name, last name
* Account number
* Phone number

The billing information should work as it does now.

CSP Oauth

One big difference with CSP vs. Einstein and PSG is the use of an OAuth2 flow for retrieving bearer tokens for authorization to the CodeBig2 API.  This will be added to the web app setup, similar to what we have now for the Slack app registration.  When the admin first installs the both, the admin will have to go and log in to WebSec and go through the flow to generate the CIMA, WebSec, and WebSec refresh tokens to apply to the CSP service.  More details will be provided in the forum.

Submission format

No video is required for this challenge.

Your submission should be a patch file against the code mentioned in the forum.  

Your patch file should include the README.md with the appropriate setup and validation information needed by the reviewers

Final Submission Guidelines

Please see above


Final Review:

Community Review Board


User Sign-Off


ID: 30055085