AppExchange products like Gauge are great because they allow admins to build automation and workflows alongside them, ensuring a streamlined and powerful automation process within your Salesforce environment.
By integrating Gauge with Slack using Salesforce's native Slack integration, you can help your team stay in sync whenever sentiment is recorded, and it can alert managers when sentiment changes color.
The following video & blog post will walk you through the basics of how to setup the Slack <> Salesforce integration, and how to customize it to work with Gauge.
This first video covers the basics of how to setup the Slack <> Salesforce integration:
The next video here shows you how to customize a Slack flow to work with Gauge. Detailed steps will follow:
Detailed Steps to Integrate Gauge with Slack:
Step 1: Create a new Flow
1.1. Setting Up the Flow & Trigger Element
Go to Salesforce and create a new flow.
Select "Record-Triggered Flow."
Configure the trigger to activate when a task record is created. In this case it should read cstoolkit__Sentiment__c IS NULL False
Make sure "Include a Run Asynchronously path..." is checked off
Step 2: Retrieve Data in the Flow
2.1. Getting the Linked Account
Add a "Get Records" element.
Label it "getAccount."
Configure it to retrieve the account linked to the task record that triggered the flow. It should read Id Equals {!$Record.Id}
Store only the first record found.
2.2. Retrieving Previous Sentiment
Add another "Get Records" element.
Query the task object for previous sentiments where the sentiment field is not null and the task ID does not equal the current task, the conditions will look like this:
cstoolkit__Sentiment__c IS NULL False
AND Id Does Not Equal {!$Record.Id}
AND WhatId Equals {!$Record.WhatId}
Sort the results by activity date in descending order and store only the first record.
Step 3: Sending a Message to Slack
3.1. Setting Up Slack Integration
Ensure your Salesforce and Slack integration is set up. Reference this video for more details
In the flow, add an action to send a Slack message.
Select "Salesforce for Slack" and choose your workspace.
3.2. Crafting the Slack Message
Create a new resource for the Slack message.
Use Salesforce and Slack variables to format the message. It should look something like this, but you can customize it to your own needs
Mention the user, link to the task record, and include previous sentiment details.
Step 4: Testing the Integration
4.1. Running the Flow
Test the flow by creating recording a new sentiment using the Gauge Widget
4.2. Verifying in Slack
Check Slack to ensure the message was received.
The message should include the new sentiment, previous sentiment, and a link to the task record.
Conclusion
Integrating Gauge with Slack using Salesforce flows can streamline your processes and improve communication within your team. By following the steps outlined in this tutorial, you can set up a seamless integration that enhances your workflow. If you have any questions, feel free to reach out or check out our additional resources.