Lead routing using Flows: a technical guide (Part 4)
The last article of our lead routing series
Alright the time has come to finally wrap this up so I can move on to other topics.
Today we’re going to build a separate Flow that will fire off the APEX class in the first post. Credit to Automation Champion!
Here’s what we’re trying to build.
Start off by building a Record-Triggered Flow. The conditions you would set up should be:
The Round Robin field was discussed in part 3 if you want to reference this. I set it to greater than negative one because the modulo function should always be positive. This way, the Flow will not fire off unless called upon.
Setting up a time delay
In the scheduled path section set up one path so that it runs immediately. The second path should run on a 1 or 2 minute delay. This will allow for your data to be updated and for the Flow to run properly. Here is what that flow looks like.
The first Flow we set up in Part 1 should fire at the same time as this new Flow. Because this Flow is on a time delay it allows the first Flow to update the record before this second one is used to call the Lead Assignment Rules.
Adding in an Action element
We’ll want to call the APEX class we set up in Part 1. Do so by adding an Action element.
Search for the APEX class you created and feed it the record ID.
Update the Slack Notification field on the Lead
This one is simple. Select an Update Record element and fill it out.
You’re done!
So let’s hop over to Zapier.
Enter Zapier
We’re going to build a simple notification Zap. It’ll look like this.
Here’s what worked for me.
App = Salesforce. You’ll need Zapier Premium to do this. It’s about $75 per month.
Object = Lead
Event = Update Field on Record
Step Details = Slack Notification field is updated to TRUE
The second node should send a message to a Slack channel. You’ll want to make sure Zapier is connected to Slack. Work with your IT admins to set this up.
I set mine up like so:
App = Slack
Event = Send Channel Message
Channel = select the channel you want to send the message in
Message Text = set this however you want but make sure to include the following:
Slack handle of the team member you’re sending a message to. The Slack handle field on the User object should just be the text. Remove the “@” symbol. When you create the message and want to notify an individual you’ll add “<@” to the front of the field and “>” at the end of the field. This will make sure it notifies the SDR or AE who the lead has been assigned to.
And that’s it! You’re done!
This was a really long post and rather ambitious. I’m not a huge fan of doing technical deep dives like this so I’m not sure I’ll do another one for some time. If you did enjoy the series let me know. Maybe I’m wrong and you actually like this kind of material.
FWIW I did built a Python webscraper that parses out certain javascript tags to identify certain technologies the account is using. I use it myself to enrich technographic information on accounts. Maybe that’s of interest to you.
Thanks again for reading this far!
P.S. I opened up this post for those who have not decided to subscribe to the paid version of this newsletter so you can get a taste for the content. Thanks so much again!