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.
- In your playground, click
to open App Launcher, then find and click Sales.
- Click the disclosure arrow next to Leads and click New Lead.
- Enter name and company name for the lead.
- First Name:
Johnny
- Last Name:
Noodle
- Company:
Food Co
- First Name:
- Then, click Save.
- 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.
Set a Slack Alert and Send a Record from Salesforce
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.
- First, click Slack Alerts.
- Make sure your Slack workspace is selected.
- For Slack Channel, select leads.
- Toggle the Hot Leads alert as on.
- Then, click Save.
In this scenario, a colleague knows that a lead will turn hot soon and wants their manager to know.
- Now, click Send to Slack.
- The object, record, and workspace should be populated. Under Slack Channel or Person, search for and select your username.
- Add a message:
Hi. This lead will be hot soon. I’m just waiting for them to fill out the form.
- 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.
Moment of truth—head back to Salesforce, open the lead record with the custom Slack alert toggled on, and update the lead’s rating.
- Go to Details.
- Find the Rating field.
- Update the field to Hot.
- Then, click Save.
Back in the Slack, you see that Salesforce notified the leads channel of the hot lead.
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!