Salesforce Slack integration

The Salesforce-Slack integration is worth taking the time to build out. Two simple use-cases:

  • You can create a custom channel to announce New Business Opportunity Wins
  • You can update Opportunities directly from Slack

In my opinion just those two use-cases make configuring Slack and Salesforce worthwhile.

Start by installing Salesforce’s Slack package in your Salesforce: https://appexchange.salesforce.com/listingDetail?listingId=a0N3A00000FnD9mUAF&tab=e

The configuration part is pretty simple – first connect Salesforce to your Slack:

The next parts – I just skip right over – I confirm them in the set up, but I’m not interested in adding Slack to page layouts or custom objects – just sending alerts to Slack channels:

The ‘Automation Configuration’ part is what matters – this is where you’ll connect Salesforce to a specific Slack Channel. I typically create the Channel in my Slack first, then go to this section to connect Salesforce to it:

Once you’ve connected to your channel, Salesforce will save that record and give you an ID – this ID matters for adding to a Flow to post the Alert:

Now that Slack and Salesforce are configured, it’s a simple flow to post to this Channel. Create a new Flow – start with any input criteria you want, for example when an Opportunity is Closed/Won. The very first step in the Flow is to get that Slack Channel and Destination:

This is a Get Records Step where you add in the name of your Slack Channel and the Channel type of ‘channel’. Next, add a Decision Step to validate that this Slack Channel was found:

These steps ensure that there is a Slack Message Destination (i.e. the channel to post the message to) available to post to. Next, create a Text Template – this is where you’ll add the Text you want to post in the message – for example, ‘New Opportunity Won!’:

After your Decision – if the Slack Message is Found – add a new Action to post to Slack:

The Message Destination ID is the Message Destination found in the Decision Step. Record ID is the record triggering the alert. And the Message is the Text Template created earlier. The basic Flow looks like this, pretty simple:

What I found particularly cool about this is the built in Slack option to ‘Update Next Step’ directly from Salesforce: