Introduction: Why Integrate Salesforce with Slack?

In today’s fast-paced digital environment, real-time collaboration is essential for any successful business. Sales, support, and service teams rely heavily on instant notifications to stay aligned, respond faster, and act with context. While Salesforce is the backbone of customer data and case management, Slack is the nerve center of team communication.

By integrating Salesforce with Slack, businesses can:

  • Notify teams instantly when critical records are created or updated.
  • Connect the dots between data and discussion—without switching tools.
  • Reduce response times on high-priority issues like escalated cases.
  • Eliminate manual work involved in sending updates via email or chat.

For example, when a high-priority support case is created in Salesforce, your support channel in Slack should light up immediately—no delays, no toggling between tools.

This guide walks you through how to achieve that integration using Apex, Named Credentials, and a Slack webhook, without using any third-party apps or AppExchange solutions.

Use Case

“When a new Case is created in Salesforce with Priority = High, a formatted message should be posted in a specific Slack channel (e.g., #support-alerts).”

Prerequisites

✅ Slack:

✅ Salesforce:

  • Developer Org or Sandbox
  • Admin permissions
  • External Credential
  • Named Credential

Step 1: Create a Slack App and Get Bot Token

  1. Go to: Slack Apps Page
  2. Click Create New App → From Scratch
  3. Set App Name and Workspace.
  4. Go to OAuth & Permissions → Add Scopes:
    • chat:write
    • channels:read
  5. Install App to Workspace → Copy Bot User OAuth Token (starts with xoxb-...)

Check out the screenshot below:

Step 2: Create an External Credential (Required)

Before creating a Named Credential, we must define an External Credential to securely describe how Salesforce connects to the external service (Slack).

  1. Go to Setup → External Credentials
  2. Click New External Credential
  3. Fill in:
    1. Label
    2. Name
    3. Authentication Protocol
  4. Click Save

Step 2.1: Create Principals in Related External Credential

  1. Parameter Name
  2. Sequence Number
  3. Identity Type
  4. Add Authentication Parameters
    1. Parameter 1 Name
    2. Value
  5. Click Save

Step 2.2: Create Custom Headers in Related External Credential

  1. Name
  2. Value
  3. Sequence Number
  4. Click Save

Step 3: Create a Named Credential

  1. Go to Setup → Named Credentials
  2. Click New Named Credential
  3. Configure as follows:
    1. Label
    2. Name
    3. URL
    4. Enable for Callouts – Enabled
    5. External Credential – Select your External Credential
    6. Click Save

Step 4: Assign Credential Access via Profile

To allow users (or background processes like triggers) to use this external credential:

  1. Go to Setup → Profiles
  2. Choose the System Administrator profile (or your active user’s profile)
  3. Under Enabled External Credential Principal Access, click Edit
  4. Add Your External Credential and click Save

✅ Now your org can use the Named Credential connected to this External Credential.

Step 5: Create Apex Class for Sending Slack Notifications

Step 6: Create a Handler for Case Trigger

Step 7: Create the Trigger on Case

Test It Out

  1. Go to App Launcher → Cases
  2. Create a new Case
  3. Set Priority = High
  4. Save and switch to Slack

✅ You’ll see a Slack message in #support-alerts

Below is a demo video showcasing how this integration works.

Conclusion:

Integrating Salesforce with Slack streamlines internal communication by instantly surfacing business-critical events — like high-priority support cases — to the right teams in real time.

Here’s how this integration benefits your business:

  • Faster response times – Teams are instantly notified about critical updates
  • Improved team alignment – Everyone stays informed without manual follow-ups
  • Increased visibility – Greater transparency across departments and workflows
  • Reduced manual effort – Automate notifications, reduce human error

Whether you’re in support, sales, or operations — empowering your teams with real-time Slack alerts from Salesforce can transform the way you work.

Let your Salesforce talk to Slack — and make every alert count!