top of page
Writer's pictureMatt Roy

Slackmas Series 1/4: How to set up the Salesforce app for Slack

In the first how-to guide installment of the Slackmas Series we'll review the first, the OG. The Salesforce app for Slack was the first app that Salesforce released which integrated Salesforce and Slack back in 2016. Though originally created solely for Sales Cloud, this app has since added additional support for Service Cloud and custom objects. In this article we'll install and take a look at basic functionality.


Requirements

  • Salesforce Org

  • Slack Workspace

    • Workspace Admin user to complete setup

    • End users in Slack to validate functionality

  • Time - Initial config can be done in a couple of hours

Setup


Step 1: Install Salesforce App in Slack

This step (Step 1 below) will both install the Salesforce app in Slack as well as connect your Slack to your Salesforce org. Be sure to have your Salesforce credentials at the ready.


After clicking the "Add to Slack" button, you will be prompted to allow permissions to install into Slack.


After clicking "Allow" you will be redirected to another page where you can log in and connect your org OR you can connect via Slack App Home in Slack (below).

Once connected, you will see which org you are connected to via Salesforce App Home tab and confirmation message in Salesforce App Messages tab.


With the Salesforce app installed in Slack and connected to your Salesforce org, we can proceed to installing the companion app in Salesforce.


Step 2: Install the Slack Companion App in Salesforce

Now that Slack and Salesforce are connected, we will do the "back-end" setup and configuration in Salesforce. As far as this article, we'll review only Sales Cloud usage with the Salesforce app for brevity.


You can install the companion app either from (1) the Salesforce App Home in Slack via "Get Companion App" button (2) the Step 2 screenshot above via "Get the Companion App" button or (3) directly from the Salesforce for Slack AppExchange listing (Package ID = 04t4P000002OxMvQAK).



Follow the prompts and select who you would like to install for.



Once successfully installed, you will see the package under Installed Packages in Setup.



The final step on install here is to enable licenses by navigating to Manage Licenses and clicking Enable for Platform Integrations button (which will check the "Enabled for Platform Integrations" checkbox to true).



If you attempt to use the /salesforce command in Slack at this point, you will see below error (though you are available to search). We still have to complete the Slack Setup wizard in Salesforce.




Step 3: Complete Slack Setup wizard in Salesforce


The final configuration process has a nice little wizard for us. We'll go through it step by step.



System Connections


Simply requires authorizing between Slack and Salesforce. Note, there are reviews about the companion app having issues with auth and needing to reauth, so this is a step that you may have to do many times potentially.



Enable Custom Objects


Unfortunately, although custom objects are supported, they take a bit more time to set up than the standard objects. For our purposes today, there are no custom objects we are setting up, we're good to skip this.



Custom Alerts


Here is where we get into the power of the integration by creating custom alerts based on different criteria.



To keep it simple, let's set up a rule where when Opportunity Amount is changed, we would like an alert.



Org Configuration


Now we can add the "Send to Slack" and "Slack Alerts" actions to certain layouts. Be sure to click "Add Actions to Layouts" link as simply clicking "Next" button will NOT add the actions to layouts.



Now we will review adding the Slack Message Viewer Component to Case/Lead Lightning record pages. Again, be sure to click "Add Component to Pages" link as simply clicking "Next" button will NOT add the component to pages.



Automation Configuration


Now we need to set up Message Destinations, essentially these are just Salesforce records that link to Slack Channels to be used in Process Builder (🤮) and Flow.



To keep it simple, I've set up one Message Destination for the team-sales Slack Channel.



Alright... that completes all set up. Let's test this!



Validation


Slack Testing


Let's try again to use the /salesforce command in a Slack Channel.


This lets you easily set up different alerts for your channel. For "Select Object" picklist, select Opportunity and you will see a few out of the box options as well as our previously created "Opportunity Amount Changed" alert.

Select whichever you'd like to test and validate you see a message in the channel when manipulating a record in Salesforce. Note, the message has very minimal info, so to get additional context users can click "View Record" button like seen below.


Obviously there is a lot more you can do here, so go for it!


Salesforce Testing


First, let's start with the easy stuff - Navigate to an Opportunity and you should see two new actions to Send to Slack and Slack Alerts.



Send to Slack


This gives you the opportunity to manually send a record to any Slack channel or person in the connected Slack Workspace. Navigate to an Opportunity record and click "Send to Slack" action.



The receiving channel or person will see the record as below. Notice that the message does NOT come from the Salesforce app, but instead the authenticated user between Salesforce and Slack.



Slack Alerts


This gives you the option to create very granular alerts for individual records in Salesforce. This is different than the Object alerts set up earlier in this guide via Slack which were for all record changes


I've set up the "Opportunity stage has changed" and saved. Now after editing the stage on a test opp, I see the below successfully.



Flow (Using "Slack: Post Message" action)


One last thing, let's quickly test the Message Destination we created above by creating a very simple test Flow utilizing the one "Slack: Post Message" action for when a new lead comes in. This is a big differentiator to the Salesforce (i.e. Platform) for Slack app which has many flow actions available -- something to keep in mind as you vet which tool you'll use long term.


Create a Record-Triggered Flow that fires when a new lead is created, and add one action (Slack: Post Message) to the async path (below), then save and activate. This is hardcoded as an example, please do not hardcode in production flows.




Or, if you are more familiar with flows, set it up properly by finding the Message Destination ID and using that in the flow.





Now create a new lead in Salesforce and voila -- you will receive a notification in the channel you set up the Message Destination for with the new lead.



Summary


As the oldest "Salesforce for Slack" app available, you can really feel and see that the whole process is a bit more refined than more recently released apps, though it is telling that the managed package has not been updated in over a year. Seems like it is in a stable enough place (minus any auth issues) where in the future, enhancements may instead be made to other newer apps -- just a guess. 🤷‍♂️



With the out of the box alerts for standard objects, you can get this up and adding substantial value pretty quickly at both the object and record level. This may be enough for a lot of companies. For more complex workflows and teams looking for more automation options, it definitely makes sense to look at other apps like Salesforce (i.e. Platform) for Slack or a cloud/industry based app which gives you more power and templates. Really depends on your company, team and use cases.


Need help determining which to use? This is what we do! So check out our services, check out LinkedIn and contact us via website or Slack Connect (daniel@21b.app or matt@21b.app)!

11 views

Comments


bottom of page