How I Solved It with Jennifer Lee and Paolo Sambrano

Operationalize Data Collection With Salesforce and Slack | How I Solved It

By

Welcome to another “How I Solved It.” In this series, we do a deep dive into a specific business problem and share how one Awesome Admin chose to solve it. Once you learn how they solved their specific problem, you’ll be inspired to try their solution yourself! Watch how Paolo Sambrano operationalized data collection using both Salesforce and Slack.


Key business problem

Our executive team wanted an org-wide dashboard that showed the progress and performance of the three different programs at our nonprofit. The dashboard had to be accessed at any time by people in our organization and populated with the most up-to-date metrics.

The dashboard was built in CRM Analytics and pulls data from a custom object we built and use for tracking metrics in Salesforce.

However, stakeholders responsible for updating their metrics do not use Salesforce regularly. And as much as I love working and building things in Salesforce, the last thing I want to do as an admin is tell our stakeholders that in order to update their metrics (which happens on a weekly, monthly, or quarterly basis), they need to log in to a system (Salesforce) they hardly-to-never use, and navigate to a basic screen flow to enter a number. And then, 90 days later, they need to remember to do this one thing all over again.

I’m not a monster, I’m a Salesforce Admin! I look for clean, elegant, and efficient processes to help my stakeholders.

So the question becomes, how can I get our stakeholders to update their metrics on a schedule in Salesforce without them actually using Salesforce? Can this be done with a minimal amount of clicks and mental overhead? Well, lucky for us, we’re a Slack-first shop.

How I solved it

I was able to use both Slack Workflow Builder and Flow Builder to solve for this. Let’s break down how this solution works from a high level.

  1. Use a Slack Workflow Rule on a fixed schedule to notify a stakeholder in Slack that it’s time for them to enter their metrics.
  2. The stakeholder enters their metrics into Slack.
  3. Slack passes their metrics to Salesforce.
  4. Flow creates a new record from their metrics, and the data is displayed in a CRM Analytics Dashboard.

How I built it

The example use case below demonstrates how I solved it. Let’s say I needed to submit how many skateboard kickflips I did in a month. That metric is represented as a new Salesforce record in our custom object, Cool Metrics. That data is then populated into a Salesforce report I built to track my progress.

Full disclosure, you need a paid Slack plan to use Workflow Builder. If you don’t have access to a paid Slack plan but would like to try this at home, check out the resources below with documentation on how to use Flow for Slack in Salesforce.

Create a Workflow Rule using Slack Workflow Builder

The main thing to solve for this use case was automating the reminder notifications and putting them on a set schedule. I don’t want our stakeholders to have to remember if it’s been 89 or 90 days since they last entered their metrics!

Workflow Rules can be triggered in numerous ways. For example, you can use a direct URL for a user to click on, have automation that triggers when someone uses an emoji or joins a channel, etc. Selecting the ‘On a schedule’ option was the perfect fit for us.

Slack Workflow Builder detailing the options that can trigger when a workflow can start; ‘From a link in Slack’, ‘When an emoji reaction is used’, ‘When a person joins a channel’, ‘On a schedule’, or ‘From a webhook’. The ‘On a schedule’ option is highlighted.

We can customize when we want to start our Workflow Rule, the time zone, and the frequency our Workflow Rule will fire. For our example, this Workflow Rule will fire every first Monday of the month, at 10:00 AM PST.

Slack Workflow Builder showing customization options for a workflow whose trigger is ‘On a schedule’. This example workflow will start on March 4, 2024, at 10:00 AM PST, and will recur Monthly on the first Monday.

Once we set how it will be triggered, we now start to build out the Workflow Rule itself. This is what the stakeholder will interact with.

Building out a Workflow Rule is all declarative—no code required. We’re literally just dragging and dropping the steps we want to use into our rule. The following screenshot shows a sample of the actions you can add in Slack and all of the out-of-the-box (OOTB) integrations that come with Slack Workflow Builder!

Slack Workflow Builder showing a slice of the possible steps a user can use when building their workflow. There are examples on the Slack side (Canvas, Channels, Forms, List, Messages, Users, Workflow controls), and a few OOTB integrations (Adobe Acrobat Sign, Airtable, Asana, Basecamp, Bitbucket, Box).

This is how our Workflow Rule would look in Workflow Builder.

An example Slack Workflow Rule. The image is linear with five steps starting from the top to the bottom. The steps used are ‘Send a message’, ‘Collect info in a form’, ‘Run a Flow’, and ‘Send a message’.

The structure makes sense logically.

1. We need to message the stakeholder with a reminder to enter their metrics.

The message customization step on Slack Workflow Builder. This message will display to the stakeholder when the workflow fires. This example message will go to Paolo Sambrano and states, “Hey hey! It’s that time! Please enter how many radical kickflips you did this month!"

2. The Form element houses their metrics input.

The Form step on Slack Workflow Builder. The form question asks, “How many radical kickflips did you do?” The question type is ‘Number’ and the optional description says, “No judgements!” This step is marked as required.

3. The Run a Flow action from the OOTB Salesforce integration in Slack Workflow Builder runs an autolaunched flow to pass the metric collected from the form into our flow. (More on this in a bit!)

The Run a Flow step on Slack Workflow Builder. It details the Salesforce account used to fire the flow, the flow selected, “Cool Metrics | Slack Autolaunched Flow”. It also maps the Flow variable, var_Kickflip_Number, to the answer to the form question, “How many radical kickflips did you do?”

📋 Note: When you’re linking the Salesforce user account that will fire the flow from Slack, make sure that account has the correct permission to access your object, fields, flow, etc. This could be a good place to use an integration user.

4. A confirmation message lets them know we received their metrics.

The message customization step on Slack Workflow Builder. This message displays to the stakeholder when the user submits their metric and a new record is successfully created in Salesforce. The message says, “That’s so cool! You did (number submitted) kickflips! Thanks for submitting your kickflips, (person who submitted the form)”. There is a chakka emoji.

📋 Note: A Workflow Rule works linearly; you can’t use logic to have branching paths (for example, if a stakeholder enters less than 10 kickflips, have this step fire, and show this message that wouldn’t have happened if they entered 11 or more). Although, you theoretically could use a flow Decision element to simulate logic based on what a stakeholder entered from Slack on the Salesforce side of things. That’s another blog post. 😄

When our Workflow Rule is live in Slack, this is what our stakeholder sees.

The Workflow Rule in action. The message from step 1 of the workflow is displayed; it’s sent from the ‘Enter Cool Metrics’ Workflow in Slack.

Once the user clicks Continue, they are prompted to provide the number of kickflips.

The Form element in use. The number 23 answers the question, “How many radical kickflips did you do?”

Once they click Submit, they see a confirmation message.

The workflow message displaying the first message sent earlier and showing the confirmation message from step 4.

Twenty-three kickflips! Wow, I’m making some real progress!

With the Slack Workflow Rule completed, let’s go to Salesforce to see how my 23 kickflips will make it to Salesforce.

Create an autolaunched flow in Flow Builder

We need to build an autolaunched flow to process the data coming in from Slack.

📋 Note: Slack Workflow Rules can only fire autolaunched flows. Be sure to keep this in mind when building your flow.

The autolaunched flow simply uses a Create Records element and a number variable (var_Kickflip_Number—this is receiving the number from Slack) mapped to the How Many Kickflips field on Cool Metrics to create a new record. It’s that simple!

An autolaunched flow in Salesforce with a single Create Records element named ‘Create Cool Metrics Record’.

This is the Create Records element that creates our Cool Metrics record to hold the kickflip number.

The customization options on the ‘Create Cool Metrics Record’ element. This element will create a single record, and use separate resources and literal values. It will create a record on the Cool Metrics custom object and maps the How Many Kickflips field from Cool Metrics to the value var_Kickflip_Number (which was sent from the Slack Workflow Rule).

Oh simplicity, chef’s kiss. 😘

Now that we took our metric from Slack into Salesforce and Salesforce created a new Cool Metrics record with it, let’s check out the Cool Metrics record.

The created Cool Metrics record from the flow. There is a red box highlighting the How Many Kickflips field on the record. The number is 23, the number entered from Slack. The Cool Metrics Number is CS-0010.

Now that’s what I call a Cool Metric. 😎

To tie everything up, let’s check out a report I created to track my progress. You can see my record (CS-0010) in the report!

A report titled ‘Cool Metrics | Kickflip Report’. The report displays a donut chart where the total number of kickflips is 46. There is a row on the August 2024 Created Date grouping that displays Cool Metrics record CS-0010 with 23 Kickflips. This shows the record created was picked up on the report.

And that’s how you keep your reports and dashboards up to date with Salesforce and Slack!

Business results

For our stakeholders, the automated reminders in Slack remove the mental overhead of needing to remember when they need to enter their metrics. It’s scheduled and will remind them automatically. They provide their metrics right from their reminder in Slack.

For the rest of our organization, any time someone looks up our CRM Analytics Dashboard (in Slack with the CRM Analytics app, naturally), they can be assured that the data displayed is always up to date with the freshest and latest data!

Do try this at home

Do you have an ongoing process at your organization? Do your stakeholders need to remember to complete a task every week? Every month? With Scheduled Workflow Rules, you can remove the need for users to remember when they need to take action on their ongoing task.

The best thing about working in Slack Workflow Builder is that you don’t even need to necessarily think in a Slack/Salesforce binary! Does your process involve Asana, Box, or DocuSign, for example? Slack Workflow Builder comes with a ton of OOTB integrations with other apps that are available at your fingertips right now!

That widens up the possibilities with what you can build to make your stakeholders’ lives easier!

Don’t have a paid Slack plan? Use the OOTB Flow for Slack feature! Be sure to download the Salesforce for Slack app from the Slack Marketplace.

The same principles apply from above: notify the user, collect information, and create new record. You’re just working all in Flow Builder instead of using Salesforce and Slack. For this, you’ll need two flows.

1. A scheduled flow to launch a Slack action that sends a screen flow to users’ Slack instance

 A scheduled flow, scheduled to fire every Monday at 10:00 AM PST starting on March 4, 2024. Its’ only element is a Slack Action called “Fire Screen Flow”.

2. A screen flow with a screen to collect information and a Create Records element

A screen flow with two elements. One is titled, “Cool Metrics Screen”. The second element is a Create Records element titled, “Create Cool Metrics Record”.

Resources

Want to see more good stuff? Subscribe to our channel!

SUBSCRIBE TODAY
How I Solved It with Jennifer Lee and Dee Ervin

Search Unsearchable Field Data Types | How I Solved It

Welcome to another “How I Solved It.” In this series, we do a deep dive into a specific business problem and share how one Awesome Admin chose to solve it. Once you learn how they solved their specific problem, you’ll be inspired to try their solution yourself! Watch how Dee Ervin searched unsearchable field data […]

READ MORE