USING FLOW WITH FILES: THE GOOD, THE BAD, AND THE UGLY

Written by: Kyle Hagan

The self-proclaimed "Lord of the Nerd Herd", Kyle is a Salesforce developer and admin with experience in javascript, HTML Apex, and various other Salesforce elements. He is Conga product certified, which means he know lots of sales based processes. While at FirmWorks, Kyle helped pilot the design and development of FirmWorks Files and Notes.

February 12, 2024

With so much happening in your Salesforce environment, many users fail to realize the number of clicks performed daily. Salesforce makes a heroic effort to provide their users with tools to make their workday easier. 

From Apps and Page Layouts to Flows and Apex, nearly every tool is Salesforce is there to streamline or automate a manual process. 

So, why are Flows one of the best options for enhancing a user’s daily workflow?

What Are Salesforce Flows?

Not only do flows guide a user through the data points and important aspects of interacting with Salesforce records, but they also ensure data integrity is maintained. 

Flows are a tool provided to Salesforce administrators and developers that allows a declarative UI for building automations with no code. There are a few different types of flows used every day.

Types of Salesforce Flows

Screen Flows

Screen flows are a great way to present users with an interface for guided interaction through data. A screen flow uses screen elements to allow an administrator to display data to a user as part of their interaction with a record. Before and after, the admin has access to all the normal flow tools that allow them to interact with data outside of the user.

One individual may build a flow to allow a user to create a new record from a parent record and create all the associated connections to other unrelated records at the same time, all in a single click. 

Alternatively, someone may use a flow to pull in documentation from a few different objects to attach to an email and allow the user to select to whom they send it. 

Record-Triggered flows

There are also flows that fire without any user interaction. Record Triggered Flows happen when a change in the system meets criteria set up by the administrator, then sets values, creates records, enforces sharing, or any number of other actions. This all takes place as the user updates or creates new records.

These flows are incredibly useful when you need to make sure certain teams are assigned work when records change. For example, when a User on the sales team changes an opportunity’s stage from qualifying to quote generation, this might mean the Legal team needs to check the quote terms and prepare an MSA or other legal document. With a record-triggered flow, users can simply automate the creation of a task for the appropriate persons when the sales stage is updated.

Scheduled Flows

A scheduled flow is one that is triggered by a specified date and frequency, usually daily, weekly, or monthly.

For example, a scheduled flow can delete or deactivate sales inquiries after a certain date has passed by changing the status of a lead or case to “closed”. You can set up a scheduled flow to run daily that looks at the last interaction date and if it is ten days in the past, the flow can close the case and send a case-closed email.

Platform Event Triggered Flows

Platform Events are a more advanced feature, but incredibly powerful little objects that trigger just like a normal object, but they run asynchronously with the process that created them. 

At a high level, Platform Events allow you to create a process that can run outside of the constraints around flow limits but with their own context. For a deeper dive into what platform events are check out this article from Salesforce Ben.  

For example, use Platform Events to get around mixed DML Errors. Mixed DML is when you try to interact with an Object, like a Contact, Account, or custom object, during the same process as interacting with an Administration Object (Permission Set or Managed Package Licenses). 

Let’s say you have a record-triggered flow that creates a new user when a new employee has been moved from Interview to Hired status. In this case, you can create a new user but need to separate the assignment of permission sets or licenses needed to a separate process. You can pass information on the new user into a platform event and have that assign the permissions sets and licenses to separate the DML.

Flows are a powerful tool that allow admins to simplify their users’ lift. 

But how do Flows interact with Salesforce Files and what are the limitations?

Are Files A Salesforce Object?

You may not have realized it, but Salesforce Files are objects just like any other in salesforce, or pretty darn close anyway.

Files have fields we can create on them to add additional information. They can be obtained with Salesforce Object Query Language (SOQL) and displayed on a page layout. Each of these things makes it seem like they would behave just like any other object in most scenarios but unfortunately, that is not the case.

Unlike most Objects, Files are not reportable in any of the Dashboards or Report UI that allow many other objects to be easily tracked. They also don’t get shared the same way other objects do. File sharing is purely based on what object they are linked to and how those objects are owned.

Like most of the implementation around files, the way they Interact with Flows feels unfinished.

While you can interact with Files using Get, Create, and Update elements, you can only do this with certain file objects in certain cases. Additionally, you can’t fire a Record-Triggered flow when a file is created or updated, which poses a huge problem for folks using files to drive their processes.

Enter FirmWorks Files.

Our tool was built specifically to provide users with a way to easily discover files and organize them with tags.

In addition, another key feature allows an admin to hook into Files getting created and updated called File Events.

Files + Platform events = Success!

FirmWorks Files File Events allow you to create Platform Event-Triggered flows based on a file creation, update, or deletion. This is a powerful feature for automating document-driven processes.

Once configured, a File Event will be published (created) and users can hook into those using Platform Event-Triggered Flows to see information like who uploaded the file, enforce naming conventions based on how the file tags upon upload, connect files to other objects, and more.

A common use of these features is when a sales user uploads a signed NDA to a new opportunity as part of the prospecting or closing process. This File may also be used for future opportunities the sales rep opened with the Account. Using File Events, we can make sure any NDA uploaded to an opportunity that is not a renewal, will also get attached to the account. In the future, the user can use a Record-Triggered flow to attach the Existing NDA to any new opportunities created for that Account.

Another interesting use case for Files Events is updating record values when a certain file is uploaded. Since you can’t report traditionally on Files, you need fields on another object to represent those files in a report. Using File Events, you can trigger an update on parent records to reflect what documents were previously uploaded. 

This is helpful in real estate closing processes where there are hundreds of documents involved in real estate deals, but a specific subset of those are needed to ensure closing runs smoothly. 

When a document is uploaded with a tag specific to closing, we can mark that on the Property object to show that we have the Construction inspection, Buyer’s financials, et cetera. Then realtors can report on which Properties are ready to close and which ones are missing information.

Eliminate Your Process Standoffs

File Events is a feature of FirmWorks Files and there is no additional cost to using it. Our goal with this application is truly to make files more functional and allow them to be used like any other object in a flow.

The parity is an important part of making sure all your orgs process works together and make your users successful.

If you want to try FirmWorks Files with File Events, install a free trial of our product from the AppExchange and email use about your interest in File Events.

Related Posts

Subscribe

Sign up to receive product updates, new release info, and industry news.