Configure Salesforce for use with Slack
Note: We recommend installing the Salesforce built integrations 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
- Sign in to Salesforce and open Setup.
- Using Quick Find in the top left corner of the page, search for My Domain.
- Enter the domain you'd like to use.
- Click Check Availability.
- 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
- Open your domain registration email and click the link to sign in to Salesforce.
- 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 to Salesforce
- 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.)
- Click Get It Now to install the package to your production or sandbox environment.
- Select Install for Admins Only.
- Click Install.
- Review the list of third-party websites and check the box next to Yes, grant access to these third-party websites.
- Click Continue.
- 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
- Click the gear icon in the top right and select Setup.
- Using Quick Find in the top left, search for Permission Sets.
- Check the box next to Slack Standard User, then click Slack Standard User.
- Click Manage Assignments.
- Click Add Assignments.
- To select users, check the box next to their names, then click Assign.
- Click Done.
- Click Setup in the top right.
- From the left sidebar, click the arrow next to Manage Users.
- Below Manage Users, select Permission Sets.
- Check the box next to Slack Standard User, then click Slack Standard User.
- Click Manage Assignments.
- Click Add Assignments.
- To select users, check the box next to their names, then click Assign.
- 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
- 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.
- Click Get Started.
- Click Authorize to grant Slack access to your Salesforce org.
- Enter your Salesforce credentials, then click Finish.
- Click Continue to move on to the next step.
Step 5: Enable custom objects
Note: To enable custom objects, make sure 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.
- Click Add Custom Object.
- Choose the object you'd like to enable from the drop-down menu.
- Check the boxes next to the additional fields you'd like to display with the record name in Slack. You can check up to nine.
- Click Add.
- 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.
- Click Activate to confirm.
- Click Finish.
- 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 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.
- Click New Alert.
- Choose a name.
- Select an object type from the drop-down menu.
- Choose Object Level or Record Level.
- Click Next.
- Select a field, an operator, and a value to set your alert criteria. For example, to set up an alert for quote approvals, you'd choose your custom quote object for the field, an equals operator, and add approved as the value.
- Add more criteria if you'd like. Note that date fields can't be used in alerts with compound conditions.
- Click Save.
- Click Finish.
- 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 it's visible on all pages. To add actions to your page layouts, follow these steps:
- Check the box to select your Salesforce environment(s).
- Review the list of actions and uncheck any you'd like to exclude.
- Click Add Actions to Layouts.
- 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.
- Uncheck the box next to any page layouts you'd like to exclude from displaying the Message Viewer.
- Click Add Component to Pages.
- Click Finish.
- 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'd 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
- Click Sign in with Slack to authenticate.
- Below Configure Message Destinations, click New Message Destination.
- Enter a message destination name. Select a workspace, then choose a channel or direct message from the drop-down menu.
- Click Save.
- Click Finish.
- Click the file icon to the right of a message destination to copy it so you can add it to the Message Destination ID field in the next step.
Note: If you're on the Slack Enterprise Grid plan, you'll need to sign in to each workspace 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:
- For a Process, select Slack: Post Message as the Apex Class. For a Lightning Flow, select Slack: Post Message as the Action.
- Paste the message destination you copied earlier into the Message Destination ID field.
- Make sure the Record ID references the ID of the Salesforce record that will be sent to Slack.
- If you'd 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 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 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 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’d 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:
- From Salesforce Lightning, click the gear icon in the top right and select Setup. From Salesforce Classic, click Setup in the top right.
- Using Quick Find in the top left corner of the page, search for Custom Settings.
- Next to Slack Settings, click Manage.
- Click Edit.
- Make updates to settings.
- Click Save.