Configure Salesforce for use with Slack

Note: We recommend installing the integrations built by Salesforce for the best long-term experience. The below information applies only to the Slack-built Salesforce app which no longer supports new installations.

To use the Salesforce app for Slack, a Salesforce System Administrator will first need to install and configure the Slack package in Salesforce. The package is compatible with the Salesforce Lightning and Classic Experiences, and supports Sales Cloud and Service Cloud.

Installing and configuring the Slack package using the Slack setup assistant ensures that all users in your Salesforce org can use the Salesforce app in Slack to set up alerts for both standard and custom objects.

Note: If you use Salesforce Professional, you need the API Access add-on to use Slack and Salesforce together.


Step 1: Set up your custom Salesforce domain

To use components in Lightning, your Salesforce org must have a custom domain.

Register your domain

  1. Sign in to Salesforce and open Setup. 
  2. Using Quick Find in the upper-left corner of the page, search for My Domain
  3. Enter the domain that you'd like to use. 
  4. Click Check Availability
  5. Once you've found an available domain, click Register Domain. You'll receive an email from Salesforce when registration is complete. 

Deploy your domain to users

  1. Open your domain registration email and click the link to sign in to Salesforce. 
  2. Click Deploy to Users

Note: Any links to your Salesforce org with your old domain will redirect to the new custom domain automatically.


Step 2: Install the Slack package in Salesforce

  1. Visit the Slack listing in the AppExchange. (No longer supported. If you're installing Salesforce for the first time, install the Salesforce-built integrations for the best experience.)
  2. Click Get It Now to install the package in your production or sandbox environment. 
  3. Select Install for Admins Only
  4. Click Install
  5. Review the list of third-party websites and check the box next to Yes, grant access to these third-party websites
  6. Click on Continue
  7. Once installation is complete, click Continue to Setup Assistant

Note: If your installation takes more than a couple of minutes, Salesforce will send you an email when it's complete.


Step 3: Grant permissions to use Slack with Salesforce

Once the Slack package is installed to Salesforce, it’s important that system administrators apply the Slack standard user permission set for all users in your Salesforce org that update record data. Applying this permission set grants users access to Slack actions in your Salesforce org and lets them trigger notifications when records are created or updated. To assign the permission set to Salesforce users, follow the steps below:

Salesforce Lightning

Salesforce Classic

  1. Click the gear icon in the upper right and select Setup
  2. Using Quick Find in the upper left, search for Permission Sets.
  3. Tick the box next to Slack Standard User, then click Slack Standard User
  4. Click Manage Assignments.
  5. Click Add Assignments.
  6. To select users, tick the box next to their names, then click Assign.
  7. Click Done.
  1. Click Setup in the upper right.
  2. From the left sidebar, click the arrow next to Manage Users.
  3. Below Manage users, select Permission sets.
  4. Tick the box next to Slack Standard User, then click Slack Standard User.
  5. Click Manage Assignments.
  6. Click Add Assignments.
  7. To select users, tick the box next to their names, then click Assign.
  8. Click Done.


Step 4: Configure the connection between Salesforce and Slack

After the Slack package is installed to Salesforce and users have been assigned the permission set, use the setup assistant to configure the connection between your Salesforce org and Slack. You’ll also have the option to configure the settings below:

  • Custom objects
  • Alerts for standard and custom objects
  • Components on page layouts
  • Custom message destinations

If you don't need to configure a particular setting, click Continue to start the step, then click Finish to move on to the next one. 

Grant Slack access to Salesforce

  1. From Salesforce Lightning, open the App Launcher and select the Slack Setup Assistant app. From Salesforce Classic, click the plus button at the top of the page, then find and select Slack Setup from the list. 
  2. Click Get Started
  3. Click Authorize to grant Slack access to your Salesforce org. 
  4. Enter your Salesforce credentials, then click Finish
  5. Click Continue to move on to the next step. 


Step 5: Enable custom objects

Note: To enable custom objects, make sure that you're using Salesforce package version 1.56 or higher.

Enabling a custom object allows you to add Slack actions and the Slack Message Viewer to custom page layouts, and lets members of your workspace subscribe to alerts in Slack. You must enable custom objects before proceeding to the next step to set up custom alerts. This step will only work for custom objects that are not included in the standard set.

  1. Click Add Custom Object
  2. Choose the object you'd like to enable from the drop-down menu. 
  3. Tick the boxes next to the additional fields that you'd like to display with the record name in Slack. You can tick up to nine. 
  4. Click Add
  5. Click the Activate link, then select Automatic Activation. If automatic activation fails, you'll need to activate the object manually to make it accessible in your Salesforce org. 
  6. Click Activate to confirm. 
  7. Click Finish
  8. Click Continue to move on to the next step. 


Once a custom object is activated, you can add the Slack actions and Slack message viewer when setting up page layouts , and create custom alerts. 

Note: Once you activate a custom object, it cannot be deactivated.


Step 6: Set up custom alerts
 

Note: To set up custom alerts, make sure that you're using Salesforce
package version 1.56 or higher.

A system administrator can configure custom alerts to expand the default alerts in the package. Once created, members of your Slack workspace or Salesforce org can choose to subscribe to these custom alerts as they would for other object- or record-level alerts. 

  1. Click New Alert
  2. Choose a name. 
  3. Select an object type from the drop-down menu. 
  4. Choose Object Level or Record Level
  5. Click Next
  6. Select a field, an operator and a value to set your alert criteria. For example, to set up an alert for quote approvals, you would choose your custom quote object for the field, an equals operator and add approved as the value. 
  7. Add more criteria if you like. Note that date fields can't be used in alerts with compound conditions. 
  8. Click on Save
  9. Click Finish
  10. Click Continue to move on to the next step. 


Step 7: Set up page layouts

Configure page layouts in Salesforce to send information between Slack and Salesforce. 

Note: To remove actions from page layouts, you'll need to use the Object Manager in Salesforce Setup.

Add Slack actions to layouts

There are two types of Salesforce actions available to configure – Send to Slack and Slack Alerts. You can add the Send to Slack action to individual page layouts, or global layouts so that it's visible on all pages. To add actions to your page layouts, follow these steps: 

  1. Check the box to select your Salesforce environment(s). 
  2. Review the list of actions and uncheck any that you'd like to exclude. 
  3. Click Add Actions to Layouts
  4. Click Next


Add the Slack Message Viewer component to pages

To view Slack messages in Salesforce, add the Slack Message Viewer component to your page layouts. Please note that the Message Viewer component is only supported for standard objects in Salesforce Classic. 

  1. Untick the box next to any page layouts that you'd like to exclude from displaying the Message Viewer. 
  2. Click Add Component to Pages
  3. Click Finish
  4. Click Continue to move on to the next step. 

Tip: If you don't see Lightning record pages to choose from, you'll need to create them for your Salesforce org.


Step 8: Create custom message destinations

If you like, you can create custom message destinations to send Salesforce information to specific Slack conversations from Process Builder or Flow templates. 

Set up message destinations

  1. Click Sign in with Slack to authenticate. 
  2. Below Configure Message Destinations, click New Message Destination
  3. Enter a message destination name. Select a workspace, then choose a channel or direct message from the drop-down menu. 
  4. Click on Save
  5. Click Finish
  6. Click the file icon to the right of a message destination to copy it so that you can add it to the Message Destination ID field in the next step. 

Note: If you're on the Slack Enterprise Grid subscription, you'll need to sign in to each workspace that you'd like to set message destinations for.

Add message destinations in Process Builder or Flow

Once you've set up a message destination, follow the steps below to configure a Process or Lightning Flow to send a Salesforce record to Slack:

  1. For a Process, select Slack: Post Message as the Apex Class. For a Lightning Flow, select Slack: Post Message as the Action. 
  2. Paste the message destination you copied earlier into the Message Destination ID field. 
  3. Make sure the Record ID references the ID of the Salesforce record that will be sent to Slack. 
  4. If you like, add message text to send to Slack along with the record. For a Process, add a new row and select Message from the Field drop-down menu. The Type that you choose will determine the appropriate Value to enter. For a Flow, toggle Message input on, and enter a value or resource. 


Step 9: Modify Slack settings

There are two settings that you can change to manage how notifications are sent from Salesforce to Slack:

  • Trigger record limit
    The trigger record limit determines when notifications are sent to Slack. If you set your trigger record limit to 10, notifications will only be sent when nine or fewer actions are taken to help to prevent a high volume of Slack notifications when you take certain actions in bulk.
  • Async limit
    The Salesforce app for Slack can consume a maximum of 250,000 asynchronous calls per 24-hour period. The default number of calls set in Salesforce is 240,000 but you can increase this threshold if you like. Please note that Slack will only process calls beyond 250,000 when the daily limit resets.

To update these settings, follow the steps below: 

  1. From Salesforce Lightning, click the gear icon in the upper right and select Setup. From Salesforce Classic, click Setup in the upper right. 
  2. Using Quick Find in the upper-left corner of the page, search for Custom Settings.
  3. Next to Slack Settings, click Manage.
  4. Click Edit.
  5. Make updates to settings.
  6. Click on Save.

Related articles

Recently viewed articles