Configuration + Setup

All System Administrator based profiles can see the File Report tab after installation. To allow other users to see the tab you will need to assign them the FirmWorks Files Reporting permission set. To assign a permission set, please follow the documentation from Salesforce HERE.

Using Select Reports

Start by clicking the Select Reports button to see some out of box reports based on standard Sales Cloud objects (Accounts, Contacts, and Opportunities).

File Reporting: Select Reports

Once the Reports UI is open, click the load icon to the left of a report to fill in the criteria in the sections below.

File Reporting: Select Reports 2

Click ‘Run Report’ to return results from your org based on the filters established by the Quick Report selected.

File Reporting: Select Reports 3

From here, you can save reports, add/remove filters, change the record to return criteria, and interact with result records.

Saving Reports

There are two buttons in the top right of the Reports section that will save the current filters. This will start a save event that will commit the report to the database and make it available in the Quick Reports menu.

  • Save Report: This will save the report under the existing name. If it is a new report it will ask you to input a name and a report description.

  • Save As: This will open the UI to save a new report whether the report exists or not.
File Reporting: Saving Reports

Adding/Removing Filters

To add a filter to the Selected Object in Step 1, click on the ‘Add a Filter For’ button in the top right. Once the filter row has been added, selecte the field from the Field Name selection, choose an Evaluation criteria, and set a value. For more help on supported values click the question mark at the end of the row.

File Reporting: Adding/Removing Filters

You can also change the Selected Object by using the Selected Object drop down. This will remove all of the current filters, so make sure to save your changes before modifying the Selected Object.

To remove a filter, click the trash can next to the filter row you wish to remove.

Follow the same steps above to add or remove a filter from the tagged documents section in Step 2.

Advanced Filtering

Filter Sets

Using Filters Sets, File Reporting can be even more powerful. A Filter Set represents a set of criteria for a single Salesforce objects or File you want to include in your report.

When used in Section 1 of a report a Filter Set will functions as an additional way of grouping filters on a single object. This allow for more comprehensive filtering using AND and/or OR on your chosen object.

When used in Section 2 of a report, a Filter Set represents the same thing, but also offers a second option to track multiple documents as part of a single report. For example, if you wanted to see if an account has both a file tagged as an NDA and a file tagged as an MSA based on a picklist tag field, you would do the following:

First, set up a Filter Set where your criteria is Picklist equal to = NDA. Click + Filter Set and add a Second set with the criteria Picklist equal to = MSA. Finally, change your operator to ‘And Has’. The And Has operator will check for multiple Files for a given object.

File Reporting: Filter Sets

Filter Set Evaluation Pattern

Use this box in a Filter Set to determine how your logic evaluates. If all the operators between your criteria are the same, you can use the drop down to set the operator. If your logic needs to change between nodes, you can type your custom logic in the Filter Set Evaluation Pattern box. Once you type logic in this box, the Drop down list will disappear since they are no longer relevant. To get them back remove your custom logic.

File Reporting: Filter Set Evaluation Pattern

View Syntax Button

This button can be clicked at any time to show you the current logic you are using in your filter.

File Reporting: Syntax Button 1

If you are using the And Has operator, the syntax will show a set of criteria for each Filter Set separated by a comma.

File Reporting: Syntax Button 2

Record Return Criteria

File Reporting: Record Return Criteria
The button in Step 3 will allow you to change the returned record set.

  • All Records – This will return all records that fulfill the selected object criteria in Step 1.
  • Records With Documents – This will return all records that fulfill the selected object criteria in Step 1 and have documents that meet the criteria in Step 2.
  • Records Without Documents – This will return all records that fulfill the selected object criteria in Step 1 and do not have documents that meet the criteria in Step 2.

Record Return Criteria

File Reporting: Results Buttons
  • Schedule Report – This will allow you to schedule a report to drive business process based on the returned results. For more, see the Scheduling Reports section below.
  • Run Report – This button will run the report. When clicked, it will go retrieve the data set again and capture any new records that should be returned based on the criteria.
  • Download – This button will download an Excel sheet with metadata on the Content Version records returned in the Results section.
  • Download Files – This button will download a zip file containing all the documents returned in the Results section.
  • View Details – This button will open a new window to show that row’s Selected Objects Salesforce Record.

Scheduling Reports

Basic Scheduling

Scheduling reports allows a report to be run regularly and post platform event. To learn more about which Salesforce technology can subscribe to platform events, please see this Salesforce Article.

To start, click the ‘Schedule Reports’ button to access the scheduling UI. This UI will open the scheduling UI for the current report and also allow you to set schedules for all the saved reports in the org.

File Reporting: Basic Scheduling
  • Frequency – There are two options for Frequency: Monthly and Weekly.
  • Days – This is a multi-select list that allows you to pick one or more days for the schedule to run on.
  • Start At – Set the time of day which you’d like the scheduled report to run on the frequency and days previously selected.

At this point, click ‘Create Schedule’ to generate a scheduled job for the report with the settings selected. You can generate more than one scheduled job for a report if needed.

Advanced Scheduling

The ‘Advanced’ button in the scheduling UI allows a user to input their own cron expression or have the choices build one. Once the Advanced button is set the cron expression is no longer going to affect the choices (they are greyed out to indicate this).

File Reporting: Advanced Scheduling

Using Flows to Automate Action on Scheduled Reports

Scheduling a File Report results in a Platform Event being published for each returned from the report. You can subscribe to these events by using a Platform Event-Triggered flow. To setup a Platform Event-Triggered Flow, use the Salesforce documentation HERE. When asked which Platform Event you want to choose, select File Report Event as seen below.

FIle Reporting: Using Flows 1

The File Report Event allows access to the following information for use with the flow:

File Reporting: Using Flows 2
  • Event Type – This value is currently set to “Report” to indicate where the event was sourced. It may be updated with new values in the future.
  • Message – This Field will be populated with any system error messages that occur.
  • # of Documents – This is the Number of Documents associated with the record that was returned from the report for this Platform Event. If the report is set up to return records without documents, this will be 0.
  • Report – The ID of the metadata record associated with the report that created the Platform Event.
  • Report Details – The Description field from the metadata record associated with the report that created the Platform Event.
  • Report Name – The name (Custom-) of the Scheduled Job associated with the  Report Schedule.
  • Source ID(s) – The ID of the record returned from the report that created the platform event.
  • Status – Blank unless there is an issue.

These files are available from the record object when using the elements in a flow. Generally, using the Source ID(s) field to get records to update is a good practice. Some use cases are:

  • Updating a field on a record when a document exists or does not exist.
  • Creating a task or Chatter on the Source ID(s) record to alert the owner that action is needed.

Alternatively, you can also ust the File Report Runner for Records.

Creating Custom Reports

Instead of using Quick Reports, a custom report can be created to store reports for specific business needs. To create a new report, choose an object from the ‘Select Object’ section in Step 1. Next, add filters to that object and the docmuents you want to see in Step 2 and Step 3, respectively. Then, choose which results you want to return in Step 4 and click ‘Run Report’.

File Reporting: Creating Custom Reports

You can save this report for future use using the same steps in the Saving Reports section above.