Suivez votre progression
Accueil Trailhead
Accueil Trailhead

Create a Custom Alert and Add Slack to the User Interface

Salesforce is now set up to connect with Slack and all the right permissions are granted. It’s time to configure what kind of alerts are sent, and bring Slack actions to the Salesforce user interface.

Set Up Custom Alerts

Think of custom alerts like topics in a newsfeed. If you just send the entire feed to someone, they can miss what’s really important or feel overwhelmed. 

Instead, you use custom alerts, such as hot lead alerts for sales team members or new case alerts for customer service, so they only get the information that’s important to them. 

Head back to Slack Setup. System Connections and Enable Custom Objects should already be marked as complete. Click Continue to set up a custom alert.

The sales team wants to ensure high-priority leads are tracked closely. You can set a custom hot lead alert so Salesforce sends notifications to Slack when a lead turns hot. 

Here’s how.

  1. Click New Alert
  2. Alert Name: Hot Leads
  3. Object: Lead
  4. Alert Type: Record Level
  5. Then, click Next

Now, specify the criteria.

  1. Field: Rating
  2. Operator: Equals
  3. Value: Hot

Create New Alert with Lead Rating Equals Hot

Then, click Save and Finish to complete the custom alert.

Add Slack Actions

First of all, what are Slack Actions? 

  • There are two types of actions available: Send to Slack and Slack Alerts.
  • Send to Slack lets you send messages and records from Salesforce into Slack. For example, a user can send the contact information for a lead to a colleague.
  • Slack Alerts lets you customize automated alerts for Salesforce record changes in Slack channels, such as when someone tags a colleague in a new sales lead, changes the status of a lead, or converts a lead. This helps ensure that everyone working on the project stays notified without needing to switch back and forth between Salesforce and Slack, or send follow-up messages to notify your team members of changes.
  • You can add the Send to Slack action to individual page layouts, or to global layouts so it's visible on all pages. You can also add the Slack Alerts to set up record-level alerts. For example, a record-level alert may include notifying your team when a stage is changed for a specific opportunity record.

In the Slack Setup app, System Connections, Enable Custom Objects, and Custom Alerts should be complete. Click Continue to head into Org Configuration.

  1. You want to slowly roll out this integration, so you focus on sales leads first. Uncheck all layouts by clicking on the box next to the Layout Name header.
  2. Select only the lead layouts:
    1. Lead (Marketing) Layout
    2. Lead (Sales) Layout
    3. Lead (Support) Layout
    4. Lead Layout

      You can always go back and add Slack Actions to other layouts as you roll the integration out for other teams and use cases.
      Add Slack Action to Layouts screen with all lead layouts selected
  3. Then, click Add Actions to Layouts.
    It takes a moment for the actions to be added to each layout. After this is done, you see a success message: Successfully added Slack actions to the selected page layouts.
  4. Click Next.
  5. Then, click Finish.

You now have a custom alert and a way for your sales team to message people right from Salesforce. Next, you specify what Slack workspace to send messages to, and create automation so the alerts go to a specific Slack channel.