Bots Icon

Slack

Slack is a team collaboration application that has gained momentum over the last few years. Slack offers different integration options: Webhooks, Slash Commands, and Bots.

Incoming Webhooks

Using Incoming Webhooks, external applications like Salesforce can automatically post messages to Slack channels when specific events under their control occur. For example, DreamHouse uses an incoming Webhook to automatically post a message to the #general Slack channel when the price of a property changes in Salesforce.

Watch the video below to see how that integration was easily implemented using Process Builder:

Source Code:

The source code for the PostPriceChangeToSlack class is included in the DreamHouse unmanaged package.

Slash Commands

Using Slash Commands, users can query or update information in external apps from within the Slack UI. For example, DreamHouse brokers can use slash commands to quickly access property information in Salesforce without leaving the Slack user inteface:

  • /houses search [city] [min price] [max price] [bedrooms]: Search for houses in Salesforce
  • /houses changes: Show recent price changes

Watch the video below to see these commands in action in Slack:

GitHub Logo

The source code and installation instructions for this integration are available in this repository on GitHub.

Bots

Using a bot, you can monitor Slack channels activity and respond to Salesforce requests expressed in natural language.

Watch this video to see the Salesforce bot in action:

To create a bot, you create an application that opens a Websocket connection to Slack. Your application will then receive all the messages from channels your bot has been invited to, as well as the direct messages Slack users sent to your bot.

Your app can then use pattern matching algorithms and natural language processing tools to decide if and how to respond to a message.

GitHub Logo

The source code and installation instructions for this integration are available in this repository on GitHub.