Flows, flows, flows! It wouldn’t be a Salesforce release without updates to flows and Winter '22 is no exception! Today, Andrew is covering updates that technical admins will really enjoy, like the new features to flow builder utility, the ability to invoke subflows on specific record trigger flows, roll back updates, and invoke outbound messages from after save record triggered flows.
Hello everyone. Andrew Davis here, senior developer with Digital Mass. Today, we're going to talk about one of my personal favorite declarative automation suites out there on the market and that's Salesforce's flow builder utility.
There are a lot of very exciting new features being unveiled for flow builders that really help empower and embolden technical admins who are building on the platform. One of these features is the ability to send external messages or call out to external services from within your flows using a new asynchronous path option that's available to you in the flow configuration interface, which is also a new feature in winter 22. So what you can now do is you can actually set an entirely separate path, a subset of actions to be executed asynchronously after a transaction commits in your after safe record triggered flows, that will allow you to do things like reach out to an external system, or submit a message in slack or teams or our post something to Heroku or maybe send some sort of commit message to an external database.
Next with flows is the ability to invoke sub-flows on both after save record triggered flows and the before delete variant on record triggered flows. This will allow you to consolidate and compartmentalize your flow logic and allow you to keep more clean, concise declarative automation in your instance, without having to create redundant elements. Before winter 22 was released this wasn't possible with record-triggered flows. You actually had to create a lot of those same pieces of logic, even if they were shared across multiple objects. For instance, now with sub-flows, you can chain that together. You can consolidate all that logic and you can take advantage of what's been previously available for your standard auto launched flows.
Another cool feature with flows is the ability to roll back updates. In declared to development in apex today, you can actually set safe points in the database and roll back your transaction to a previous state in case things go awry. Well, that same functionality is now available in flows. So if, for instance, you had an update, on an account where you inserted an account record in one of your flows, you then had a contact insert immediately thereafter intended to look up to that previously inserted account. If it's the case that the contact insert fails, perhaps you want that account record to not be created in the system. Well, before winter 22, that account record would have been created, but the contact would have failed. If you had some sort of fault handling logic in the flow, you would have been left with one account, no contact, and your flow have been resolved without having any significant errors that would have prompted the user within any disruption. Now, with this rollback behavior, you can actually extend the behavior of your fault handling to include a rollback to a previous state in the flow, allowing you to actually redact that account, insert and ensuring that that account is not created without a successful contact insert. This is very helpful for ensuring a consistent state in your database, ensuring that you have even cleaner, better-handled errors and is something that better reflects the development side of things.
Lastly, workflow rules are no longer the only source to push outbound messages to external services. That's right. You can now actually invoke outbound messages from your after saving record-triggered flows. Now replace that with your after save record trigger flows. After that commit happens, you can have an outbound message pushed to the service or the endpoint of your choosing with all the account information or all of the record information of your choosing using your existing configured outbound messages. That's really it that we have for flows today. We're going to be talking about Salesforce functions in the next video, looking forward to geeking out with the developers, then thanks.
The Developers Speak is a video series featuring certified Salesforce consultants at Digital Mass. They come to you twice a month to help bridge the gap between business problems and technical solutions.
About the Developer:
Meet Andrew Davis: Andrew joined the Digital Mass team as a Senior Salesforce Developer in August 2020. He came in with a few certifications on his belt and hasn't slowed down since. Andrew currently holds 10+ Salesforce certifications.
Outside of work, Andrew likes to spend his time playing D&D, camping, and burying himself in Youtube playlists exploring things ranging from emerging technologies to how to hand-sew your own socks - it’s pretty obvious he fits right in with the DM crew!