La toute nouvelle Trailblazer Community est là ! En savoir plus.

Test Your Slack Automation

To test, you’re going to do several actions in Salesforce and see the result in Slack. So make sure you have both environments open.

Create a New Lead in Salesforce

Your automation focuses on alerting the sales team when there is a new lead. They’re out in the field talking to customers. They’re on the phone brokering deals. They may not have access to Salesforce when they really need the information. Sending them an alert via Slack makes sure they get what they need in real time.

  1. In your playground, click app launcher icon to open App Launcher, then find and click Sales.
  2. Click the disclosure arrow next to Leads and click New Lead.
  3. Enter name and company name for the lead.
    1. First Name: Johnny
    2. Last Name: Noodle
    3. Company: Food Co
  4. Then, click Save.
  5. Now, head over to your Slack workspace and click on the leads channel.

Just like that, you see the new lead notification in Slack. That’s your automation handiwork.

Salesforce new lead post in Slack for Johhny Noodle

Set a Slack Alert and Send a Record from Salesforce



If channel alerts stop working, you can reauthorize the connection using the Slack Setup App in Salesforce.

  • Head to the Slack Setup App.
  • In System Connections, click the Edit button.
  • Click the Reauthorize button.
  • Then click Finish.

The Slack service team is also here to help you (login required).

While the new lead automation took the most effort, you also set up a convenient way for team members to share records and in-context messages to Slack. Head back to Salesforce and open the lead you just created. Note the Slack buttons that were added to the layout–Send to Slack and Slack Alerts.

Lead with Send to Slack and Slack Alerts buttons highlighted by a red box and arrow

  1. First, click Slack Alerts.
  2. Make sure your Slack workspace is selected.
  3. For Slack Channel, select leads.
  4. Toggle the Hot Leads alert as on. Manage Slack Alerts popup with Hot Leads toggled on and highlighted by a red arrow
  5. Then, click Save.

In this scenario, a colleague knows that a lead will turn hot soon and wants their manager to know.

  1. Now, click Send to Slack.
  2. The object, record, and workspace should be populated. Under Slack Channel or Person, search for and select your username.
  3. Add a message:
    Hi. This lead will be hot soon. I’m just waiting for them to fill out the form. 
  4. Then, click Send to Slack.

The message and lead information goes straight to Slack. Head to your workspace and click on the Salesforce app to see the message.

Post in Slack with message and lead information

Moment of truth—head back to Salesforce, open the lead record with the custom Slack alert toggled on, and update the lead’s rating. 

  1. Go to Details.
  2. Find the Rating field.
  3. Update the field to Hot.
  4. Then, click Save.

Back in the Slack, you see that Salesforce notified the leads channel of the hot lead.   

Hot Leads message in Slack with button to view record

Understand Security with the Salesforce for Slack App

Now, click View Record to see the lead details.

Recall that you assigned Slack permissions to your profile. This permission enables you to see the details within the Slack channel feed via an ephemeral message, a message that’s only available to you. Note, Slack also respects permissions that are assigned in Salesforce.

Any time an alert is sent from Salesforce, the Salesforce for Slack app checks if the user who created the alert still has access to the record, to ensure data isn’t leaked inadvertently. In other words, Salesforce is the source of truth for your permissions. If your user doesn’t have access in Salesforce, they won’t have access in Slack.

Understand Storage

With a few exceptions, Slack doesn't explicitly store Salesforce data anywhere. The exceptions are as follows:

  • Salesforce notification subscriptions are stored, which allow the Salesforce for Slack integration to determine which notifications should be sent into Slack.
  • Any Salesforce content that is shared in a non-ephemeral Slack message (either manually posted to a channel by a user, or posted by an alert to expose a few simple fields from that record) exists in Slack’s database, just like any other non-ephemeral Slack message. Note that when searching Salesforce from Slack (using the /salesforce command), the responses you get back are, by default, ephemeral. However, users do have the option to push that data into Slack as a non-ephemeral message.
  • Access tokens and subscription configurations are stored within Slack’s internal database as well as in the Salesforce database to allow bidirectional API calls.

Most importantly, the Salesforce for Slack app adheres Salesforce’s security review and Slack security practices.

Sum It Up! 

That’s it. You’ve integrated Slack with Salesforce and automated alerts. Along the way, you created an easy way for team members to share information and messages in real time without having to swivel between systems. You familiarized yourself with the security and data flow, and now you’re ready to dive deeper into how you can use the Salesforce app in Slack. Congratulations! 


Formez-vous gratuitement !
Créez un compte pour continuer.
Qu’est-ce que vous y gagnez ?
  • Obtenez des recommandations personnalisées pour vos objectifs de carrière
  • Mettez en pratique vos compétences grâce à des défis pratiques et à des questionnaires
  • Suivez et partagez vos progrès avec des employeurs
  • Découvrez des opportunités de mentorat et de carrière