Giter Club home page Giter Club logo

slackforce's Introduction

Slackforce

A simple Node.js application that acts as a Slash Command message broker between Slack and Salesforce.

Watch this video to see the application in action.

Read this blog post for more details.

Follow the instructions below to deploy your own instance of the application:

Step 1: Create a Connected App

If you haven't already done so, follow the steps below to create a Salesforce connected app:

  1. In Salesforce Setup, type Apps in the quick find box, and click the Apps link

  2. In the Connected Apps section, click New, and define the Connected App as follows:

    • Connected App Name: MyConnectedApp (or any name you want)
    • API Name: MyConnectedApp
    • Contact Email: enter your email address
    • Enabled OAuth Settings: Checked
    • Callback URL: http://localhost:8200/oauthcallback.html (You'll change this later)
    • Selected OAuth Scopes: Full Access (full)
    • Click Save

Step 2: Deploy the Slash Commands

  1. Make sure you are logged in to the Heroku Dashboard

  2. Click the button below to deploy the Slash Commands on Heroku:

    Deploy

  3. Fill in the config variables as described.

    • For SF_CLIENT_ID, enter the Consumer Key of your Salesforce Connected App
    • For SF_CLIENT_SECRET, enter the Consumer Secret of your Salesforce Connected App
    • For SF_USER_NAME, enter the the username of your Salesforce integration user
    • For SF_PASSWORD, enter the the username of your Salesforce integration user
    • Leave SLACK_OPPORTUNITY_TOKEN blank for now.
    • Leave SLACK_CONTACT_TOKEN blank for now.
    • Leave SLACK_CASE_TOKEN blank for now.

Step 3: Create the Slash Commands in Slack

  1. In a browser, go to the custom integration page for your Slack team. For example https://YOUR_TEAM_NAME.slack.com/apps/manage/custom-integration. Replace YOUR_TEAM_NAME with your actual team name.

  2. Click Slash Commands, and click Add Configuration

  3. In the Choose a Command input field, type /pipeline and click Add Slash Command Integration

  4. In the Integration Settings section:

    • Command: /pipeline
    • URL: the URL of the app you deployed on Heroku followed by /pipeline. For example: https://your-heroku-app.herokuapp.com/pipeline
    • Method: POST
    • Copy the token, open another browser tab, login to the Heroku Dashboard, and set the Heroku SLACK_OPPORTUNITY_TOKEN config variable to the value of that token (Setting>Reveal Config Vars)
    • Customize Name: Salesforce Opportunities

    Click Save Integration.

  5. Repeat these steps to create another Slash command called /contact, calling https://your-heroku-app.herokuapp.com/contact. In the Heroku dashboard, set the SLACK_CONTACT_TOKEN config var to the value of the token that was generated in Slack.

  6. Repeat these steps to create another Slash command called /case, calling https://your-heroku-app.herokuapp.com/case. In the Heroku dashboard, set the SLACK_CASE_TOKEN config var to the value of the token that was generated in Slack.

slackforce's People

Contributors

ccoenraets avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.