Workflows require the use of an Equals
operator which is reliant on "RB2B" first being set as a picklist value in your Salesforce instance. To manually add "RB2B" as a Lead Source option in your picklists, follow the instructions in this article.
Table of Contents
Sending "New Contact" Notifications from Salesforce to a Slack Channel
To set up notifications from Salesforce to a Slack channel when a new Contact is created, follow these steps:
Step 1: Install "Salesforce for Slack" App in Salesforce
From the Slack Marketplace, install the Salesforce for Slack app.
In Salesforce, Go to Setup → Search for Slack Apps Setup
Follow the steps provided to complete the setup of the app.
Step 2: Create a Flow to Send Notifications to Slack
In Salesforce, Go to Setup → Search for Flows → Click New Flow.
Select Record-Triggered Flow and click Create.
Set the Trigger Conditions:
Object:
Contact
Trigger When:
A record is created
Entry Conditions:
Field:
Lead Source
→ Operator:Equals
→ Value:RB2B
Create a Path labeled
RB2B Contact Created Send to Slack Channel
Time Source:
When Contact is Created
Offset Number:
1
Offset Options:
Minutes After
Step 3: Create the Slack Message
Under that Path, add a new Element by clicking
+
and Search for Send Slack MessageDefine the parameters for the Slack message.
Label:
Send New Contact Message to Slack
Slack App:
Salesforce for Slack
Slack Workspace:
Your Workspace
Execute Action As:
Slack App
Slack Conversation ID:
C########## *
Slack Message:
Create New Resource
Create a New Resource
Type:
Formula
API Name:
RB2BNewContactMessage
Date Type:
Text
Formula: (sample formula, labels may differ from your Salesforce)
'New contact identified by RB2B: ' + {!$Record.FirstName} + ' ' + {!$Record.LastName} + SUBSTITUTE({!$Label.LineBreaker},"-","") +
'Email: ' + {!$Record.Email} + SUBSTITUTE({!$Label.LineBreaker},"-","") +
'Company: ' + {!$Record.Account.Name} + SUBSTITUTE({!$Label.LineBreaker},"-","") +'Website: ' + {!$Record.Website__c} + SUBSTITUTE({!$Label.LineBreaker},"-","") +
'LinkedIn URL: ' + {!$Record.Linkedin__c} + SUBSTITUTE({!$Label.LineBreaker},"-","") +
'Web Traffic: ' + TEXT({!$Record.Web_Traffic_Picklist__c}) + SUBSTITUTE({!$Label.LineBreaker},"-","") +
'Employee Range: ' + TEXT({!$Record.Account.Employee_Range__c}) + SUBSTITUTE({!$Label.LineBreaker},"-","") +
'Industry: ' + TEXT({!$Record.Account.Industry}) + SUBSTITUTE({!$Label.LineBreaker},"-","") +
'Industry Sub Type: ' + {!$Record.Account.Industry_Sub__c} + SUBSTITUTE({!$Label.LineBreaker},"-","") +
'Contact Link: ' + {!ContactLink}
Save your new Flow and Activate when ready.
* Enter the Channel ID for the channel you wish to send notifications to. To find your Channel ID, first click into the channel in Slack then at the top of the message window, click the channel name. A modal window should appear and display your Channel ID at the bottom. Channel IDs start with the letter C like C##########
Sending Notifications from Salesforce to Account Owners of Account activity on Slack
To set up notifications from Salesforce to Account Owners of Account activity on Slack, follow these steps:
Step 1: Install "Salesforce for Slack" App in Salesforce
From the Slack Marketplace, install the Salesforce for Slack app.
In Salesforce, Go to Setup → Search for Slack Apps Setup
Follow the steps provided to complete the setup of the app.
Step 2: Ask the Account Owner to Also Install "Salesforce for Slack"
To send notifications to the Account Owner directly about RB2B activity on an Account that they own, they must also install "Salesforce for Slack" within Slack.
From the Slack Marketplace, install the Salesforce for Slack app.
Step 3: Create a Flow to Send Notifications to Slack
In Salesforce, Go to Setup → Search for Flows → Click New Flow.
Select Record-Triggered Flow and click Create.
Set the Trigger Conditions:
Object:
Contact
Trigger When:
A record is created or updated
Entry Conditions:
Field:
Lead Source
→ Operator:Equals
→ Value:RB2B
Create a Path labeled
RB2B Contact Created Send to Slack Channel
Time Source:
When Contact is Created
Offset Number:
1
Offset Options:
Minutes After
Step 4: Check That the Account Owner Has the Slack App Installed
Under that Path, add a new Element by clicking
+
and Search for Check If User Is In Slack WorkspaceDefine the parameters for the Element
Label:
Check for Slack User in Slack
Slack App:
Salesforce for Slack
Slack Workspace:
Your Workspace *
Execute Action As:
Slack App
Salesforce User ID:
$Record > Account ID > Owner ID
or{!$Record.Account.OwnerId}
Step 5: Create Decision
Under that Path, add a new Element by clicking
+
and Search for DecisionDefine the parameters for the Element
Label:
Is User in Slack?
Outcome Label:
User is a Member of the Workspace
Condition Requirements to Execute Outcome:
All Conditions Are Met (AND)
Conditions:
Resource:
User is a Member of the Workspace
→ Operator:Equals
→ Value:True
Step 6: Create the Slack Message
Under that Path, add a new Element by clicking
+
and Search for Send Slack MessageDefine the parameters for the Slack message.
Label:
Send Notification to Account Owner
Slack App:
Salesforce for Slack
Slack Workspace:
Your Workspace
Execute Action As:
Slack App
Slack Conversation ID:
$Record > Owner ID > User ID
or{!$Record.OwnerId.UserId}
Slack Message:
Create New Resource
Create a New Resource
Type:
Formula
API Name:
RB2BAccountOwnerNotification
Date Type:
Text
Formula: (sample formula, labels may differ from your Salesforce)
'Activity notice for ' + {!$Record.Account.Name} + SUBSTITUTE({!$Label.LineBreaker},"-","") +{!$Record.FirstName} + ' ' + {!$Record.LastName} + ' was active on your website as identified by RB2B.' + SUBSTITUTE({!$Label.LineBreaker},"-","") +
'Email: ' + {!$Record.Email} + SUBSTITUTE({!$Label.LineBreaker},"-","") +
'Company: ' + {!$Record.Account.Name} + SUBSTITUTE({!$Label.LineBreaker},"-","") +
'Website: ' + {!$Record.Website__c} + SUBSTITUTE({!$Label.LineBreaker},"-","") +
'LinkedIn URL: ' + {!$Record.Linkedin__c} + SUBSTITUTE({!$Label.LineBreaker},"-","") +
'Contact Link: ' + {!ContactLink}
Save your new Flow and Activate when ready.
Notifying Account Owners Via Email
To set up a notification for an Account Owner when a "Webpage View" is created in an Account that they own, follow these steps:
Step 1: Create a Record-Triggered Flow
Go to Setup → Search for Flows → Click New Flow.
Select Record-Triggered Flow and click Create.
Set the Trigger Conditions:
Object:
Task
Trigger When:
A record is created
Entry Conditions:
Field:
Subject
→ Operator:Equals
→ Value:Webpage View
Click Done.
Step 2: Get the Contact’s Account & Owner
Click + → Select Get Records.
Label: "Get Related Contact"
Object:
Contact
Filter Conditions:
Id = {!$Record.WhoId} (This links the Task to the Contact)
Store Field Values:
AccountId
→ Stores the Contact’s related Account.
Click Done.
Get the Account Owner
Click + → Select Get Records again.
Label: "Get Account Owner"
Object:
Account
Filter Conditions:
Id = {!Get Related Contact.AccountId}
Store Field Values:
OwnerId
→ This is the Account Owner.
Click Done.
Step 3: Send an Email Alert to the Account Owner
Click + → Select Action.
Search for: "Send Email" → Select "Send Email Alert".
Label: "Notify Account Owner of Webpage View"
Email Alert: If you already have an email template for this, select it. If not:
Go to Setup → Search for Email Alerts → Click New Email Alert.
Create an alert using Account Owner as the recipient.
Recipient:
{!Get Account Owner.OwnerId}
Subject: "A Contact in Your Account Visited the Website"
Email Body:
A new Contact from your Account was just identified.
Contact Name: {!$Record.WhoId}
Account Name: {!Get Related Contact.AccountId}
Contact Link: {!ContactLink}Click Done.
Step 4: Save & Activate
Click Save, name it
Email Alert Sales Rep for Webpage View
.Click Activate.