Skip to main content
All CollectionsIntegrationsSalesforce CRM
Playbook: Setting Up Website Visitor Notifications for Account Owners in Salesforce
Playbook: Setting Up Website Visitor Notifications for Account Owners in Salesforce
Updated over 2 weeks ago

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

  1. From the Slack Marketplace, install the Salesforce for Slack app.

  2. In Salesforce, Go to Setup → Search for Slack Apps Setup

  3. Follow the steps provided to complete the setup of the app.

Step 2: Create a Flow to Send Notifications to Slack

  1. In Salesforce, Go to Setup → Search for Flows → Click New Flow.

  2. Select Record-Triggered Flow and click Create.

  3. Set the Trigger Conditions:

    • Object: Contact

    • Trigger When: A record is created

    • Entry Conditions:

      • Field: Lead SourceOperator: EqualsValue: RB2B

  4. 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

  1. Under that Path, add a new Element by clicking + and Search for Send Slack Message

  2. Define 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

  3. 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}
  4. 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

  1. From the Slack Marketplace, install the Salesforce for Slack app.

  2. In Salesforce, Go to Setup → Search for Slack Apps Setup

  3. 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.

  1. From the Slack Marketplace, install the Salesforce for Slack app.

Step 3: Create a Flow to Send Notifications to Slack

  1. In Salesforce, Go to Setup → Search for Flows → Click New Flow.

  2. Select Record-Triggered Flow and click Create.

  3. Set the Trigger Conditions:

    • Object: Contact

    • Trigger When: A record is created or updated

    • Entry Conditions:

      • Field: Lead SourceOperator: EqualsValue: RB2B

  4. 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

  1. Under that Path, add a new Element by clicking + and Search for Check If User Is In Slack Workspace

  2. Define 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

  1. Under that Path, add a new Element by clicking + and Search for Decision

  2. Define 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 WorkspaceOperator: EqualsValue: True

Step 6: Create the Slack Message

  1. Under that Path, add a new Element by clicking + and Search for Send Slack Message

  2. Define 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

  3. 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}
  4. 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

  1. Go to Setup → Search for Flows → Click New Flow.

  2. Select Record-Triggered Flow and click Create.

  3. Set the Trigger Conditions:

    • Object: Task

    • Trigger When: A record is created

    • Entry Conditions:

      • Field: SubjectOperator: EqualsValue: Webpage View

  4. Click Done.

Step 2: Get the Contact’s Account & Owner

  1. Click + → Select Get Records.

  2. Label: "Get Related Contact"

  3. Object: Contact

  4. Filter Conditions:

    • Id = {!$Record.WhoId} (This links the Task to the Contact)

  5. Store Field Values:

    • AccountId → Stores the Contact’s related Account.

  6. Click Done.

Get the Account Owner

  1. Click + → Select Get Records again.

  2. Label: "Get Account Owner"

  3. Object: Account

  4. Filter Conditions:

    • Id = {!Get Related Contact.AccountId}

  5. Store Field Values:

    • OwnerId → This is the Account Owner.

  6. Click Done.

Step 3: Send an Email Alert to the Account Owner

  1. Click + → Select Action.

  2. Search for: "Send Email" → Select "Send Email Alert".

  3. Label: "Notify Account Owner of Webpage View"

  4. 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.

  5. Recipient: {!Get Account Owner.OwnerId}

  6. Subject: "A Contact in Your Account Visited the Website"

  7. Email Body:

    A new Contact from your Account was just identified.

    Contact Name: {!$Record.WhoId}
    Account Name: {!Get Related Contact.AccountId}
    Contact Link: {!ContactLink}
  8. Click Done.

Step 4: Save & Activate

  1. Click Save, name it Email Alert Sales Rep for Webpage View.

  2. Click Activate.

Did this answer your question?