Swarming with Flow: Create Deal Rooms in Slack for your Account Teams

Swarming refers to the assembly of a group of collaborators to team up to solve a problem or work an issue. The recently published Slack Actions can be combined with Record-Triggered flows to automatically generate dedicate Slack channels (think ‘deal rooms’ or ‘case rooms’) when records are created or change to a particular state.

The package provided below installs a fully functional flow-based Slack swarming solution that you can install and customize. As initially configured, it creates a channel to serve as deal room each time an opportunity is created with an amount above $100,000. And it then invites all of the Account Team Members for that opportunity’s related Account to the created channel.

Watch the Video

Key Element – Using Account Team Members in Flow

You can query for Account Team Members in Flow using the standard Get Records. Traditionally, you might loop over the records and use their corresponding userIds to retrieve User records. This flow uses a couple of installable flow action extensions to eliminate the need for a loop.

How It Works

Part 1: Triggering on Opportunity Creation

The Opportunity Creation trigger uses the Launch Flow Dynamically action to call the separate Generate Deal Room flow. Later this year it will become possible to do this all in a single flow instead of in 2 flows.

Part 2: The Main Deal Room Generation Flow

This flow uses Slack Actions from the Slack Actions extension and also calls a subflow to convert Account Team Members to Users:

Part 3 : Getting Users from Account Team Users

This small flow uses actions to turn Account Team Members into User Records. These elements could have been folded into the above Generate Deal Room flow, but it’s a good practice to try and create reusable subprocesses.

The solution


1) Turn ‘Account Teams’ On

The org this is installed into must have Account Teams activates (See Setup –> Account Teams)

2) Install Prerequisite Extensions

The org needs the following extension packages, if you don’t already have them installed. They should be installed in order:
Install: Flow Actions Base Pack
Install: Flow Screen Components Base Pack
Install: Datatable
Install: Launch Flows Dynamically
Install: Slack Actions
Install: Collection Actions

This is the most dependencies I’ve yet seen on a Flow extension! It’s a pain to have to do them all at once, but once one of these is installed, you don’t have to do it again unless you choose to update it to a newer version.

3) Setup Account Team Members

Currently, if you create an Opportunity and it doesn’t have an associated Account that has at least 1 Account Team Member, the flow will fail and the deal room will not be created. So make sure that you are creating an Opportunity that has an Account and that that Account has an Account Team with at least 1 member.

4) Make Sure that the Users have SlackIds

For each Account Team Member that you want to enable, make sure they have a SlackID on their User object. If necessary, create a text field on User called ‘SlackId’. Slack ID’s are available here:

You can also discern them by running Salesforce Slack Administrator flow in debug log and seeing what the result is in the log when you try inviting a user to a channel


Working on making this available as a package.


View source