Welcome to another “Automate This!” In this live-streamed video series, we cover all things automation, from use cases and best practices to showcasing solutions built by Awesome Admin Trailblazers like you. With automation, you can remove manual tasks, drive efficiency, and eliminate friction and redundancy. In this episode, learn how Becka Dente leverages a simple flow AND a Salesforce Labs app to increase top-of-the-funnel efficiency.
Business need
Measuring lead response time is crucial because it directly impacts the likelihood of converting potential customers. Research consistently shows that the faster a business responds to a lead, the higher the chances of engagement and conversion. Quick responses demonstrate attentiveness, build trust, and keep potential customers from seeking alternatives. We need a flow that provides an easy way to set lead response time, while still respecting our working hours and holidays!
The solution
We wanted to automate both the time a prospect became qualified as well as the time we would expect someone from sales to follow up with the individual. By leveraging a few custom fields, Flow, and a Salesforce Labs app, we were able to create an elegant solution without ever touching code.
Part one: Configure business hours
The very first requirement is to configure your company’s business hours, including any holidays. This step will help ensure that no service-level agreement (SLA) due times are assigned outside of your working hours.
After installing the Salesforce Laps app called Business Time from AppExchange, configure your custom metadata types with records that will correlate to your different SLA times. In this example, our SLAs will be 30 minutes for our hottest leads and 60 minutes for warm leads.
Part two: Build the flow
Next, you’ll create a record-triggered flow on the Contact object.
In this example, we trigger the flow whenever a Contact’s Marketing Score is changed, but you can use whatever criteria makes the most sense for your organization.
Next, create a few variables to use throughout this flow. Our first variable is var_SLADue, which is a Date/Time variable that will hold the Date/Time value the follow-up is due on the record. The second variable is var_Minutes, which is a number variable that will hold the number of minutes we’re adding to get the value for the SLA Due Time. Finally, we need a single record variable, var_SLAMinutes, that will be used when we call the Apex (from our Business Time app) to do our SLA calculation.
Now that we have our entry criteria and our variables created, we can put the pieces together to make our flow. The first element is a Decision element that determines how quickly we’ll need to follow up with the contact. For this example, a Hot Marketing Qualified Lead (MQL) is any record with a Marketing Score value greater than or equal to 100.
A warm MQL is any record with a Marketing Score over 74.
Now that our records are segmented, we can use these different branches to search for and then assign the different SLAs to our var_Minutes variable.
We use the Get Records element to search for the custom metadata types you created in part one of this process. Within that same step, you can store that record in the single record variable var_SLAMinutes we created earlier. This helps to keep our flow compact and clean, free of unnecessary steps.
Repeat this for every branch of your Decision element for every different SLA requirement your organization has.
Next, we use anAssignmentelement. We take the minutes value from the Business Hours record we retrieved in our Get Records step, and assign that value to our var_Minutes variable.
The next step is where the magic happens. We’re going to execute an Apex action (using the Apex class one that came with our Business Time app) using the variables we set to give us our output variable for the SLA Due Time. It’s important to remember to expose the advanced options and store the output of the Apex in our final variable, var_SLADue.
The penultimate step for our flow is to assign the var_SLADue value to the record that triggered the flow using a simple Update Records element.
Finally, we create our Slack alert. The first step is to create a text template resource to hold the body of our message. When sending messages to Slack, I always use Plain Text to avoid formatting issues.
Finally, we add our Send Slack Message element, passing in all the parameters necessary to get our Slack message to the correct channel. The Slack Conversation ID can be found in the channel details of the channel you are wanting to send your message to. The Slack Message is the text template that we created in the previous step.
I like to put all my Slack notifications on aRun Asynchronously branch instead of a scheduled branch. This allows for the most flexibility with our flow’s entry criteria.
When you’re all done, your flow should look something like this:
Results
Automating SLA due-time calculations allows us to track user follow-ups against established response time commitments. By providing clear expectations for follow-up timing, we have now established a standardized metric for performance coaching, eliminating the need for manual review of individual records.
Welcome to another “Automate This!” In this live-streamed video series, we cover all things automation, from use cases and best practices to showcasing solutions built by #AwesomeAdmin Trailblazers like you. Automation allows you to remove manual tasks, drive efficiency, and eliminate friction and redundancy. In this episode and accompanying blog post, Narender Singh will show […]
Welcome to another “Automate This!” In this live-streamed video series, we cover all things automation, from use cases and best practices to showcasing solutions built by Awesome Admin Trailblazers like you. With automation, you can remove manual tasks, drive efficiency, and eliminate friction and redundancy. In this episode, let’s see how Bradley Condon built the […]
Welcome to another “Automate This!” In this live-streamed video series, we cover all things automation, from use cases and best practices to showcasing solutions built by Awesome Admin Trailblazers like you. With automation, you can remove manual tasks, drive efficiency, and eliminate friction and redundancy. In this episode, let’s see how Ohad Idan vanquishes shared […]